The question is "how to do it efficiently", mostly in time, ideally in
space too.
X {"0 1"_1 _ A
is not as good as your other suggestion (and it's not working the same way).
On Mon, Mar 31, 2014 at 1:00 AM, Dan Bron <[email protected]> wrote:
> If the question is just "how to get it done", rather than "how to get it
> done using } tacitly", then I suggest straightforward selection at rank.
>
> X {"0 1"_1 _ A
> 0 17 28 39 42 52 65 75 85 93
> 8 10 20 35 49 56 64 70 86 94
> 9 18 25 37 44 50 61 72 87 99
> 3 12 21 32 49 55 63 79 86 99
> 0 16 23 32 49 51 67 73 85 92
> ...
>
> -Dan
>
> PS: Because i haven't seen my previous message on this come back yet, the
> answer using } tacitly and fixing A is:
>
> X=: 50 10 ?@$ 10
> A=:i. 10 10
> ]`(A"_)}"_1 X
> 0 71 82 93 24 25 56 57 58 39
> 80 1 2 53 94 65 46 7 68 49
> 90 81 52 73 44 5 16 27 78 99
> 30 21 12 23 94 55 36 97 68 99
>
>
> > On Mar 30, 2014, at 5:46 PM, Brian Schott <[email protected]>
> wrote:
> >
> > Are you familiar with J's Oblique? Your mention of diagonals suggest it
> to
> > me.
> >
> > http://jsoftware.com/help/dictionary/d421.htm
> >
> >
> >
> > --
> > (B=)
> > ----------------------------------------------------------------------
> > For information about J forums see http://www.jsoftware.com/forums.htm
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm