4 #ifndef __permutation__ 5 #define __permutation__ 30 CPerm(uint8_t n, uint8_t init[]);
46 template<
class u
int> uint
GetNum()
const;
bool IsIdentity() const
Identity permutation test.
uint8_t operator[](uint8_t n) const
Get nth element of map.
uint8_t m_nSize
Number of things being permuted.
friend bool operator==(const CPerm &p0, const CPerm &p1)
Equality test.
uint GetNum() const
Get reverse lexicographic number.
void printnum() const
Print reverse lexicographic number.
void printmap() const
Print as a map.
CPerm(uint8_t n)
Constructor.
uint8_t GetSize() const
Get size.
Declaration of the extensible unsigned integer class.
const CPerm & operator *=(const CPerm &p)
Permutation composition.
bool operator==(const CPerm &p0, const CPerm &p1)
Is equal to.
The extensible unsigned integer class.
std::vector< uint8_t > m_vecCycle
Cycle notation.
uint8_t * m_nMap
Permutation sends i to m_nMap[i].
bool operator!=(const CPerm &p0, const CPerm &p1)
Is not equal to.
void RandomizeOdd(uint64_t(*rng)(void))
Set to random odd permutation.
void Randomize(uint64_t(*rng)(void))
Set to random permutation.
CPerm & operator=(const CPerm &p)
Assignment operator.