yield_all_permutations_of_sequence_in_orbit

sequencetools.yield_all_permutations_of_sequence_in_orbit(sequence, permutation)

Yields all permutations of sequence in orbit of permutation.

>>> 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)]

Yields permutations in lex order.

Returns generator.