>> 
<< 
Usr 
Pri 
JfC 
LJ 
Phr 
Dic 
Rel 
Voc 
!: 
Help 
Dictionary
9. Disjoint Classification (Graphs)
If only the final element of a boolean list b is non-zero, 
then (and only then) will the result of </b be non-zero.  
Consequently, </\ applied to b suppresses all ones 
after the first, and the result therefore represents 
a disjoint classification.  For example:
   cct=: #:@i.@(2: ^ #)            NB. Complete classification table
   b=: |: cct 2 3 5 7
   b
0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1
0 0 0 0 1 1 1 1 0 0 0 0 1 1 1 1
0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 1
0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
   </b
0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0
   </\b
0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1
0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0
0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0
0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0
   y=: (x-3) * (x-5) [ x=: 1 2 3 4 5 6 7
   range=: >./ - i.@spread
   spread=: 1: + >./ - <./
   bc=: (range <:/]) y
   bc;(</\bc);({&'.*' </\bc)       NB. Barchart and graphs
+-------------+-------------+-------+
|1 0 0 0 0 0 1|1 0 0 0 0 0 1|*.....*|
|1 0 0 0 0 0 1|0 0 0 0 0 0 0|.......|
|1 0 0 0 0 0 1|0 0 0 0 0 0 0|.......|
|1 0 0 0 0 0 1|0 0 0 0 0 0 0|.......|
|1 0 0 0 0 0 1|0 0 0 0 0 0 0|.......|
|1 1 0 0 0 1 1|0 1 0 0 0 1 0|.*...*.|
|1 1 0 0 0 1 1|0 0 0 0 0 0 0|.......|
|1 1 0 0 0 1 1|0 0 0 0 0 0 0|.......|
|1 1 1 0 1 1 1|0 0 1 0 1 0 0|..*.*..|
|1 1 1 1 1 1 1|0 0 0 1 0 0 0|...*...|
+-------------+-------------+-------+
>> 
<< 
Usr 
Pri 
JfC 
LJ 
Phr 
Dic 
Rel 
Voc 
!: 
Help 
Dictionary