On Sun, Jan 4, 2009 at 12:59 PM, Devon McCormick <[email protected]> wrote:
> To clean this up,here's an example of how this first part of "mS":
>
> ny=. #y
> ax=. i:<.-: #x
> hy=. <.-: ny
> xi=: hy + I - ax
> xj=: hy + J - ax
>
> could be simplified to
>
> xij=. (IJ+<.-:#y)-/i:<.-:#x
I am not sure that this is correct.
To quickly test, I modified Aai's mS, adding after xj=: the line:
'xi xj'=. ((I,:J)+<.-:#y)-/i:<.-:#x
And when I tried this, using 100 NoKPs 4 4, I got
|index error
| p1=.+/x*xi {y,0$~+/ny<:xi
but that had worked before I made this change
Looking closer, xi and xj had 5 items after this
change and had had 401 items before.
Maybe I will try looking at the algorithm later today, but I
do not know if I will have time.
FYI,
--
Raul
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm