muEC::SG::Perm2Code – calculates the code of a permutation

The muEC::SG::Perm2Code function calculates the Lehmer code of a permutation.

Let math be the code of perm, then math is equal to the number of indices math such that math.

→ Examples

Call:

muEC::SG::Perm2Code(perm)

Parameters:

perm

any list denoting a permutation

Related Functions:

muEC::SG::Code2Perm

Example 1:

muEC::SG::Perm2Code( [4,1,5,2,3] );

math

muEC::SG::Code2Perm( % );

math