Roger Hui wrote:
> 
> The description pertains to the standard form of the
> cycle representation.  <3 1 is not in standard form.
> A given cycle representation can be put into the
> standard form by two applications of C. 

Well, my question is more like: "how do you get this:

   C. <3 1
0 3 2 1

when you are not in the position of having standard cycle representation?

And my conjecture is this algorithm. Please advise:

- cycle_rep =: < 3 1 
- r =: monadic_raze cycle_rep               NB.   3 1
- perm_vector =: ( ( max r ) + 1 ) $ _1   NB. _1 _1 _1 _1
- any holes in the razed cycle_rep are "cycles of length 1" and can simply
fill in the value at the index as the value. In this case 0 goes to position
0 and 2 goes to position 2 
- any remaining holes are filled in by unrolling the boxed cycles. In this
case, we just have 3 1, so we put 1 at index 3 and 3 and index 1 


-- 
View this message in context: 
http://www.nabble.com/C.-%3C-3-1----NB.-the-cycles-are-not-exhaustive-tf4823734s24193.html#a13801713
Sent from the J General mailing list archive at Nabble.com.

----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to