A function to generate the Lehmer permutation ordering.
Generates all permutations of a given embedding dimension, ordered according to the Lehmer coding scheme.
generate_lehmerperm_matrix(ndemb)
ndemb
: The embedding dimension.A numeric matrix that contains the Lehmer permutation pattern.
This function converts ranks to indices and back.
http://www.keithschwarz.com/interesting/code/?dir=factoradic-permutation
Sebastian Sippel
Useful links