On 7/8/07, Brian Schott <[EMAIL PROTECTED]> wrote:
Unfortunately, this does not add to the core
features of your results.
Hmm...
I guess I could suggest a few non-core changes as well.
First off, I'd rearrange ta to try and avoid clipping it in email. Either
compress it so it might fit on one line
ta=:#:([EMAIL PROTECTED])1024*1030 2174 510 766 895 2012 2026 2034 4066 3996
or spread it out across multiple lines (using linefeed as delimiter instead
of space)
ta=:"."0;._2]0 :0
01000000011
10000111111
00011111111
00101111111
0011011111101111011110
01111101110
01111110101
01111111001
11111110001
11111001110
)
Second, I'd prefer if 13 : could actually transform its expressions to tacit.
This currently means:
[1] Only use local assignments
[2] Do not re-use names
[3] Use those names only as verb arguments
th=:13 :'t;(>1{y),w[[t=.w 100000"_`[`]}(s-(<[w=.{./:s=.>0{y){x)'
ty=:13 :'>1{y th^:([EMAIL PROTECTED])(+/y);0$0'
That said, I have a question.
ty is almost (but not quite) the same as
ty1=: [: /: +/
The difference shows up in the context of +/hh:
ty hh
11 16 21 12 13 14 15 17 18 19 20 0 1 9 7 8 2 3 4 6 5 10
ty1 hh
11 16 21 12 13 14 15 17 18 19 20 0 1 4 9 6 7 8 2 3 10 5
If I inspect the tail where these are different
7 8 2 3 4 6 5 10 { +/hh
63 63 64 64 56 63 71 66
6 7 8 2 3 10 5 { +/hh
63 63 63 64 64 66 71
I see that ty doesn't quite put +/hh in monotonic order.
When I inspect the intermediate results from th, this looks
like the effect of an off-by-one index error which hits when
it's ordering a sequence with repeated values. Or am I missing
something important?
Thanks,
--
Raul
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm