Skip to main content

Module permutation

Module permutation 

Source
Expand description

Permutations of {0, ..., n-1} in lexicographic order, with Lehmer-code rank/unrank.

Structs§

PermutationIter
Iterator over permutations of {0, ..., n-1} in lexicographic order.

Functions§

permutation_rank
The Lehmer-code (lexicographic) rank of perm.
permutation_unrank
The permutation of {0, ..., n-1} at lexicographic ordinal rank.
permutations
Construct a permutation iterator over {0, ..., n-1}.