A

The connections can be specified by a boolean

The connection matrix is convenient for determining various properties of the graph, such as the

from=: 3 7 2 5 5 7 1 5 5 5 2 6 1 2 3 7 7 4 7 2 7 4 to=: 5 6 0 2 6 2 7 6 0 7 3 3 2 1 7 0 4 2 3 0 0 3 $ arcs=: from,.to 22 2 |: arcs { nodes=: 'ABCDEFGH' Transposed for display DHCFFHBFFFCGBCDHHEHCHE FGACGCHGAHDDCBHAECDAAD CM=: #. e.~ [: i. [ , [ Connection matrix from arcs ]cm=: (>:>./,arcs) CM arcs 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 1 1 0 1 0 0 0 0 0 0 0 0 0 1 0 1 0 0 1 1 0 0 0 0 1 0 1 0 0 0 1 1 0 0 0 1 0 0 0 0 1 0 1 1 1 0 1 0 (+/cm);(+/"1 cm); (+/+/cm);(#arcs);(#~.arcs) +---------------+---------------+--+--+--+ |3 1 4 4 1 1 2 3|0 2 3 2 2 4 1 5|19|22|19| +---------------+---------------+--+--+--+The foregoing results are the in, out, and total degrees; followed by the number of arcs, and the number of distinct arcs. A boolean vector

imfam=: [ +. +./ . *. (b=: 1 0 0 0 0 0 0 1) imfam cm 1 0 1 1 1 0 1 1

>> << Usr Pri JfC LJ Phr Dic Voc !: Help Dictionary