sequencetools.yield_all_permutations_of_sequence_in_orbit

abjad.tools.sequencetools.yield_all_permutations_of_sequence_in_orbit.yield_all_permutations_of_sequence_in_orbit(sequence, permutation)[source]

New in version 2.0.

Yield all permutations of sequence in orbit of permutation in lex order:

abjad> from abjad.tools import sequencetools
abjad> list(sequencetools.yield_all_permutations_of_sequence_in_orbit((1, 2, 3, 4), [1, 2, 3, 0]))
[(1, 2, 3, 4), (2, 3, 4, 1), (3, 4, 1, 2), (4, 1, 2, 3)]

Return generator of sequence objects.

This Page