Permutations by swapping: Difference between revisions

m
(Added Quackery.)
Line 2,965:
temp release ] is perms ( n --> [ )
 
[ []dup swap0 witheachpeek
size odd parity put
[] swap witheach
[ nested
i^parity oddshare 2 * 1 -
iff i^ else i
odd 2 * 1 -
join
nested join ] ] is +signs ( [ --> [ )
parity release ] is +signs ( [ --> [ )
 
3 perms +signs
Line 2,986 ⟶ 2,991:
[ [ 0 1 2 ] 1 ]
 
[ [ 0 1 2 3 ] -1 ]
[ [ 0 1 3 2 ] -1 ]
[ [ 0 3 1 2 ] -1 ]
[ [ 3 0 1 2 ] -1 ]
[ [ 3 0 2 1 ] -1 ]
[ [ 0 3 2 1 ] -1 ]
[ [ 0 2 3 1 ] -1 ]
[ [ 0 2 1 3 ] -1 ]
[ [ 2 0 1 3 ] -1 ]
[ [ 2 0 3 1 ] -1 ]
[ [ 2 3 0 1 ] -1 ]
[ [ 3 2 0 1 ] -1 ]
[ [ 3 2 1 0 ] -1 ]
[ [ 2 3 1 0 ] -1 ]
[ [ 2 1 3 0 ] -1 ]
[ [ 2 1 0 3 ] -1 ]
[ [ 1 2 0 3 ] -1 ]
[ [ 1 2 3 0 ] -1 ]
[ [ 1 3 2 0 ] -1 ]
[ [ 3 1 2 0 ] -1 ]
[ [ 3 1 0 2 ] -1 ]
[ [ 1 3 0 2 ] -1 ]
[ [ 1 0 3 2 ] -1 ]
[ [ 1 0 2 3 ] -1 ]
</pre>
 
1,462

edits