CM::Permutation - Module for manipulating permutations
version 0.06
The module was written for carrying out permutation operations. The module is not written for generating permutations or counting them(to that end you can use Algorithm::Permute or Math::Counting)
At the moment the following are implemented(any feature that is currently listed as implemented has tests proving it):
permutation composition and conjugate permutations
inverse of a permutation
cycle decomposition
power of a permutation
'==' operator implemented (eq is the same)
breaking cycles into transpositions( maybe making a transposition class)
write a routine to count inversions and then even() and odd() methods for CM::Permutation
writing as much tests as possible
writing routine is_cycle() to check if a permutation is a cycle
get Cycle_Algorithm to use ArrayRef[CM::Permutation::Cycle] instead of what it's using now for storing the cycles and re-write tests
add order() method for ::Permutation (will be different for ::Permutation::Cycle , where just the length is the order) and will be computed as gcd of lenghts of cycles.::Permutation (will be different for ::Permutation::Cycle , where just the length is the order) and will be computed as gcd of lenghts of cycles.
Stefan Petrea, <stefan.petrea at gmail.com>
<stefan.petrea at gmail.com>
Algorithm::Permute or Math::Counting
http://en.wikipedia.org/wiki/Cycle_(mathematics)
To install CM::Permutation, copy and paste the appropriate command in to your terminal.
cpanm
cpanm CM::Permutation
CPAN shell
perl -MCPAN -e shell install CM::Permutation
For more information on module installation, please visit the detailed CPAN module installation guide.