Generation of permutations.
More...
Generation of permutations.
Examples
std::cout <<
std::cout <<
std::cout <<
.
gen_until([](
const auto &perm) {
return perm.parity() == -1; }, 100)
.inverse()
<< std::endl;
instance gen() const
Generates a random instance from the set of valid permutations.
instance gen_until(Pred predicate, int max_tries, Args &&... args) const
Generates a random instance from the set of valid permutations until a condition is met.
permutation & set(int idx, int value)
Restricts generator s.t. value at index is fixed.
instance & add_1()
Adds 1 for printing.