I can't quite figure out what you're up to. I note that
((i.#q) { q) -: q
1
is almost a tautology, so I dont know why you have
((i.#q) { q) instead of q.
What don't you think is right? The line you flagged
(2 { q) { (i.#c) { c
is the same as
0 2 1 3 { c
which produces the result you show.
,/ q{"_ 1 c
0 1 2 3
0 2 1 3
0 3 1 2
0 1 2 4
0 2 1 4
0 4 1 2
0 1 3 4
0 3 1 4
0 4 1 3
0 2 3 4
0 3 2 4
0 4 2 3
1 2 3 4
1 3 2 4
1 4 2 3
Henry Rich
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Tracy Harms
> Sent: Friday, April 13, 2007 12:55 PM
> To: [EMAIL PROTECTED]
> Subject: [Jprogramming] more rank confusion
>
> This is another case where I'm having difficulty with elementary
> construction.
>
>
> ] q =: 0 2 4 {(i.!4) A. i.4
> 0 1 2 3
> 0 2 1 3
> 0 3 1 2
>
> ] c =: 4 comb 5
> 0 1 2 3
> 0 1 2 4
> 0 1 3 4
> 0 2 3 4
> 1 2 3 4
>
> (2 { q) { 4 { c
> 1 4 2 3
>
> ((i.#q) { q) { 4 { c
> 1 2 3 4
> 1 3 2 4
> 1 4 2 3
>
> i.#c
> 0 1 2 3 4
>
> (2 { q) { (i.#c) { c NB. This result I do not yet understand.
> 0 1 2 3
> 0 2 3 4
> 0 1 2 4
> 0 1 3 4
>
> NB. Compare individual results:
> ((i.#q) { q) { 0 { c
> 0 1 2 3
> 0 2 1 3
> 0 3 1 2
> ((i.#q) { q) { 1 { c
> 0 1 2 4
> 0 2 1 4
> 0 4 1 2
> ((i.#q) { q) { 2 { c
> 0 1 3 4
> 0 3 1 4
> 0 4 1 3
> ((i.#q) { q) { 3 { c
> 0 2 3 4
> 0 3 2 4
> 0 4 2 3
> ((i.#q) { q) { 4 { c
> 1 2 3 4
> 1 3 2 4
> 1 4 2 3
>
> desiredResult =: (0 : 0)
> 0 1 2 3
> 0 2 1 3
> 0 3 1 2
> 0 1 2 4
> 0 2 1 4
> 0 4 1 2
> 0 1 3 4
> 0 3 1 4
> 0 4 1 3
> 0 2 3 4
> 0 3 2 4
> 0 4 2 3
> 1 2 3 4
> 1 3 2 4
> 1 4 2 3
> )
>
>
> I would appreciate advice as to how I am mishandling the left-hand
> argument to the rightmost indexing verb.
>
> Thank you.
> ----------------------------------------------------------------------
> For information about J forums see
> http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm