I think I worded that wrong.  I don't want the algorithm re-expressed, I want 
an interesting new way of doing it.   The code I
posted was thrown together in 20 minutes to elucidate the spec.  So, don't 
suggest trivial improvements like

           scale     =. ] % (<0 0) { ]

or
           ap        =.  [: >@:; _2 <@:,@:{\ 2 # ]
           cxn_mats  =.  arcs2mat  @: ap 

etc.  OTOH, thoughts on different representation of the data, like

           ((* _1 ^ ])&:; {.&1@:#&.>)&> jjss
        0 1 _2 _3
        0 1  2 _3
        0 3 _1  2
        0 1  3 _2
        0 1 _2  3

are encouraged.

-Dan

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to