Another solution. Both are well-known in APL circles. ] p=: ?~23 0 10 12 2 17 13 4 3 8 16 9 6 7 18 15 11 20 21 19 5 1 14 22 /: p 0 20 3 7 6 19 11 12 8 10 1 15 2 5 21 14 9 4 13 18 16 17 22 p}~i.#p 0 20 3 7 6 19 11 12 8 10 1 15 2 5 21 14 9 4 13 18 16 17 22
----- Original Message ----- From: bill lam <[EMAIL PROTECTED]> Date: Saturday, September 8, 2007 20:01 Subject: Re: [Jprogramming] inverse permutation vector To: Programming forum <[email protected]> > Raul Miller wrote: > > ipv=: /: pv > > Thank you, I didn't realize that is so simple. ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
