Module snowcap::permutators [−][src]
Expand description
Permutators
This module contains all different iterators which iterate over all permutations. The iterators differ from each other by the order in which the permutations are yielded.
Different Permutators

HeapsPermutator
: Simple permutator, implemented using the Heaps algorithm. This permutator does not reimplementfail_pos
, and thus does not make use of the feedback functionality for permutators. The HeapsPermutaor is implemented for any type, which implements theCopy
trait. 
LexicographicPermutator
: Simple permutator, which returns all permutations in a lexicographic ordering. It is implemented for any type, which implements theCopy
trait, and requires aCompleteOrdering
for the chosen type. This permutator does not reimplementfail_pos
, and thus does not make use of the feedback functionality for permutators. 
SJTPermutator
: Permutator implementing the SteinhausJohnsonTrotter algorithm. It is implemented for any type, which implements theCopy
trait. This permutator does not reimplementfail_pos
, and thus, does not make use of the feedback functionality for permutators. 
MultipleSwapPermutator
: This is a metapermutator that consists of a different permutator. Every timenext
is called, it in terms callsnext
multiple times on the specified permutator, resulting in multiple swaps at once. The numebr of times to callnext
is chosen such that every permutation is created exactly once (by choosing the smallest prime number larger than the number of elements in the permutation series). It does not reimplementfail_pos
, and thus, does not make use of the feedback functionality for permutators. 
TreePermutator
: This permutator is based on theTreeStrategy
. The permutator generates a sequence identical to theLexicographicPermutator
, but it does not require aCompleteOrdering
. Instead, it builds a datastructure which does not require the comparison of single elements. Additionally, this permutator reimplementsfail_pos
, and makes use of the fallback funcitonality to reduce the number of permutations for dependencies with an immediate effect. 
RandomTreePermutator
: This permutator is very similar to theTreePermutator
. However, the main difference is that the ordering of the remaining elements is always shuffled, every time a new branch in the tree is entered. As for theTreePermutator
, this permutator reimplementsfail_pos
to reduce the number of permutations for dependencies with an immediate effect.
Structs
Heaps Permutator
Ordered Permutator
MultipleSwap Permutator
Random Tree Permutator
SteinhausJohnsonTrotter Permutator
Tree Permutator
Traits
Permutator trait
This is an empty trait to tell the compiler which types can be returned by the Permutator Iterator.