Does anyone have a good way to display a tree in J?  EG
C:
|__n0
|   |_n00
|   |_n01
|
|__n1
    |__n10
    |   |__n100
    |__n11
    |   |__n110
    |   |__n111
    |   |__n112
    |__n12
for a tree in parent index form:
     tr=.  _1     0    0    1      1     2    2     2      5      6      6
    6
   nms=.
'C:';'n0';'n1';'n00';'n01';'n10';'n11';'n12';'n100';'n110';'n111';'n112'
Where "tr" is the parent-index form (with _1 for the root) and "nms" are
the names of each node.

Any other neat representation of a tree would also be appreciated.

Thanks,

Devon

-- 

Devon McCormick, CFA

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

Reply via email to