music.InterestingPermutations¶
- class music.InterestingPermutations(nelements=4, method='dimino')[source]¶
Bases:
objectGet permutations of n elements in meaningful sequences. Mirrors are ordered by swaps (0,n-1…).
Methods
Generates permutations in the alternating group.
Generates rotations of permutations.
Generates mirror permutations.
Generates swap permutations.
even_odd(sequence)Determines if a permutation is even or odd.
Generates permutations with full symmetry.
Methods
__init__([nelements, method])even_odd(sequence)Determines if a permutation is even or odd.
Generates permutations in the alternating group.
Generates permutations with full symmetry.
Generates mirror permutations.
Generates rotations of permutations.
Generates swap permutations.
Attributes
- get_alternating()[source]¶
Generates permutations in the alternating group.
This method generates permutations in the alternating group of the specified size using the provided generation method.
- get_rotations()[source]¶
Generates rotations of permutations.
This method generates rotations of permutations of the specified size using the provided generation method.
- get_mirrors()[source]¶
Generates mirror permutations.
This method generates mirror permutations of the specified size using the provided generation method.
- get_swaps()[source]¶
Generates swap permutations.
This method generates swap permutations of the specified size using the provided generation method.