10 #pragma region constants 18 105, 140, 210, 210, 420,
19 420, 420, 420, 840, 840,
20 1260, 1260, 1540, 2310, 2520,
21 4620, 4620, 5460, 5460, 9240,
22 9240, 13860, 13860, 16380, 16380,
23 27720, 30030, 32760, 60060, 60060,
24 60060, 60060, 120120, 120120, 180180,
25 180180, 180180, 180180, 360360, 360360,
26 360360, 360360, 471240, 471240, 556920,
27 1021020, 1021020, 1141140, 1141140, 2042040
30 #pragma endregion constants 58 assert(i == 0 || i == 1);
69 assert(rnd !=
nullptr);
92 for(uint32_t i=0; i<
m_nSize; i++)
93 ok = ok && !(p0[i] == i && q0[i] == i);
129 static unsigned int i = 0;
const uint32_t g_nLandau[]
Landau's function for .
const CPerm & GetPerm() const
Get current permutation.
void ChooseGenerators(uint64_t(*rnd)(void))
Choose generators.
CPerm * m_pCurPerm
Current permutation.
uint32_t m_nOrder
Order of generators.
uint32_t m_nSize
Size of permutations.
void NextPerm()
Compute next permutation.
CPerm GetGenerator(int i) const
Get generator.
int m_nTail
Index of last element in delay line.
CCayley(uint32_t n)
Constructor.
const uint32_t GetSize() const
Get permutation size.
CPowerTable m_nPower[2]
Power tables for a pair of generators.
void Initialize(const CPerm &p)
Initialize.
virtual void srand(uint64_t(*rnd)(void))
Seed the generator.
void RandomizeOdd(uint64_t(*rng)(void))
Set to random odd permutation.
Declaration of the Cayley pseudo-random number generator.
void Randomize(uint64_t(*rng)(void))
Set to random permutation.
uint64_t m_nDelayLine[m_nDelay]
Delay line.