curver.kernel.permutation.Permutation¶
-
class
curver.kernel.permutation.
Permutation
(perm)[source]¶ Bases:
object
This represents a permutation on 0, 1, …, N-1.
-
cycle_lengths
()[source]¶ Return the sorted list of cycle lengths of this Permutation.
This is a total conjugacy invariant.
-
classmethod
from_dict
(dictionary, ordering=None)[source]¶ Return a Permutation from a dictionary.
The order of the elements within the dictionary may also be specified.
-
index
()[source]¶ Return the index of this permutation in the (sorted) list of all permutations on this many symbols.
-
is_conjugate_to
(other)[source]¶ Return whether this permutation in conjugate to other.
Two permutations are conjugate iff they have the same cycle lengths.
-
is_even
()[source]¶ Return whether this permutation is the composition of an even number of transposiions.
-