![]() |
Mackey
V3.3
A C++ library for computing RO(G) graded homology
|
Generates all permutations on a number of letters. More...
#include <Generators.hpp>
Classes | |
| class | ConstIterator |
| Constant iterator that is used in a ranged for loop to generate the permutations. More... | |
Public Member Functions | |
| size_t | size () const |
| Computes total number of permutations. More... | |
| PermutationGenerator (T n) | |
| Constructor sets up the generator. More... | |
| ConstIterator | begin () const |
| Begin iterator. More... | |
| ConstIterator | end () const |
| End iterator. More... | |
Generates all permutations on a number of letters.
Use with a ranged for loop: If v is a PermutationGenerator object then in
the variable i will range over all permutations.
| T | The data type of our permutations eg int |
| PermutationGenerator | ( | T | n | ) |
Constructor sets up the generator.
| n | The total number of letters |
| size_t size | ( | ) | const |
Computes total number of permutations.
| ConstIterator begin | ( | ) | const |
Begin iterator.
| ConstIterator end | ( | ) | const |
End iterator.