On 2012/04/25 19:29 , Henry Rich wrote:
> Not as simple as I would like, but simple enough I hope:
Kind of interesting to trace the events - this looks the same in j701 32 
or 64 bit Mac OS X 10.7.3

iMi7:SCORE jkt$ j64
    G =:0 1 2 2 3 4 4 5 5 6 7 7 8 9 10 10 11 11 11 12 12 12
    G =: <"1 G ,. 1 2 3 4 5 6 5 7 8 7 9 10 10 11 12 11 13 14 15 16 15 14
    jtree =: ([: ~.@; joinroutes)/

    joinroutes =: 4 : 0&.>
l =. >: (y i. {: x)
f =. 0:^:((#y)&=) (y i. {. x)
z =. (f {. y) , x , (l }. y)
echo ": l;f;x;y;z
echo y E. z
y
)

    jtree G
┌─┬─┬─────┬─────┬─────┐
│3│0│12 15│12 14│12 15│
└─┴─┴─────┴─────┴─────┘
0 0
┌─┬─┬─────┬──┬─────┐
│2│0│12 16│12│12 16│
└─┴─┴─────┴──┴─────┘
1 0
┌─┬─┬─────┬──┬─────┐
│2│0│12 16│14│12 16│
└─┴─┴─────┴──┴─────┘
0 0
┌─┬─┬─────┬──┬─────┐
│2│0│11 15│12│11 15│
└─┴─┴─────┴──┴─────┘
^C^C^C^C^\Quit: 3
iMi7:SCORE jkt$

So, only the 4th call of joinroutes, maybe someone can set up a trace in 
the interpreter.

One interesting observation getting to the above was that when I wasn't 
echoing  y E. z, j64 would consistently go 5 iterations before a dead 
loop in E. (j32 was the same as the above example).
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to