The fxt demos: permutations

Directory perm: Routines for computations with permutations.
Find a list of all files in this directory here. An index of all topics is here

You may want to look at the outputs first.

ccf2perm-out.txt is the output of ccf2perm-demo.cc.
Convert permutations to and from canonical cycle form (CCF).
The demo uses the functions from perm2ccf.h (fxt/src/perm/perm2ccf.h) perm2ccf.cc (fxt/src/perm/perm2ccf.cc)

cycles-out.txt is the output of cycles-demo.cc.
Decomposition of a permutation into cycles. Print cycles and code for the permutation.
The demo uses the functions from printcycles.h (fxt/src/perm/printcycles.h)

perm-decomp-out.txt is the output of perm-decomp-demo.cc.
Permutations as Kronecker products of simpler permutations. Nasty but useful code.

perm-invert-notag-out.txt is the output of perm-invert-notag-demo.cc.
Inversion of a permutation without extra tag bits.
The demo uses the functions from perminvert.h (fxt/src/perm/perminvert.h)

permfunc-out.txt is the output of permfunc-demo.cc.
Demo of apply_permutation(func, ...).
The demo uses the functions from permapplyfunc.h (fxt/src/perm/permapplyfunc.h) graypermute.h (fxt/src/perm/graypermute.h) graycode.h (fxt/src/bits/graycode.h) copy.h (fxt/src/aux1/copy.h)

permgray-leaders-out.txt is the output of permgray-leaders-demo.cc.
Cycle leaders (maxima or minima) for Gray permutation
The demo uses the functions from gray-cycle-leaders.h (fxt/src/comb/gray-cycle-leaders.h)

permrand-connected-out.txt is the output of permrand-connected-demo.cc.
Random connected (indecomposable) permutations
The demo uses the functions from permrand-connected.h (fxt/src/perm/permrand-connected.h)

permrand-cyclic-out.txt is the output of permrand-cyclic-demo.cc.
Random cyclic permutations.
The demo uses the functions from permrand-cyclic.h (fxt/src/perm/permrand-cyclic.h) printcycles.h (fxt/src/perm/printcycles.h)

permrand-derange-out.txt is the output of permrand-derange-demo.cc.
Random derangements (permutations with no fixed points)
The demo uses the functions from permrand-derange.h (fxt/src/perm/permrand-derange.h)

permrand-sdc-out.txt is the output of permrand-sdc-demo.cc.
Random permutations with prescribed Sets into Distinct Cycles
The demo uses the functions from permrand-sdc.h (fxt/src/perm/permrand-sdc.h) perm2ccf.h (fxt/src/perm/perm2ccf.h) perm2ccf.cc (fxt/src/perm/perm2ccf.cc)

permrand-self-inverse-out.txt is the output of permrand-self-inverse-demo.cc.
Random involutions (self-inverse permutations).
The demo uses the functions from permrand-self-inverse.h (fxt/src/perm/permrand-self-inverse.h) printcycles.h (fxt/src/perm/printcycles.h)

permutation-matrix-out.txt is the output of permutation-matrix-demo.cc.
Matrices corresponding to permutations.
The demo uses the functions from perm-all.h (fxt/src/perm-all.h)

revbin-perm-rec-out.txt is the output of revbin-perm-rec-demo.cc.
Recursive revbin-permutation routine.

swap-blocks-out.txt is the output of swap-blocks-demo.cc.
The quadruple reversal trick.
The demo uses the functions from swapblocks.h (fxt/src/perm/swapblocks.h)