music.PlainChanges¶
- class music.PlainChanges(nelements=4, nhunts=None, hunts=None)[source]¶
Bases:
objectPresents plain changes as swaps and acts in domains to make peals.
- __init__(nelements=4, nhunts=None, hunts=None)[source]¶
Initializes a PlainChanges object.
- Parameters:
- Raises:
ValueErrorIf the number of hunts is invalid.
Methods
__init__([nelements, nhunts, hunts])Initializes a PlainChanges object.
act([domain, peal])Acts in a domain using a peal.
act_all([domain])Acts in all peals using a domain.
initialize_hunts([nelements, nhunts])Initializes the hunts dictionary.
perform_change(nelements, hunts[, hunt])Performs a change procedure.
perform_peal(nelements[, hunts])Performs a peal.
saturating_hunts(nelements)Number of hunts that yields a peal over the whole symmetric group.
- static saturating_hunts(nelements)[source]¶
Number of hunts that yields a peal over the whole symmetric group.
For
nelementsbells this isnelements - 3, floored at one. Below it the peal is a proper subset of the permutations: with the old default of two hunts,PlainChanges(6)produced 120 of the 720 rows andPlainChanges(8)produced 224 of 40320. Above it nothing is gained, which is what the warning in initialize_hunts reports.
- initialize_hunts(nelements=4, nhunts=None)[source]¶
Initializes the hunts dictionary.
- Parameters:
- Returns:
dictThe hunts dictionary.
- Raises:
ValueErrorIf the number of hunts is invalid.