![]() |
Cayley
Pseudo-Random Bits from Finite Groups
|
Table of all powers of a permutation. More...
#include <PowerTable.h>
Public Member Functions | |
| ~CPowerTable () | |
| Destructor. More... | |
| void | Initialize (const CPerm &p) |
| Initialize. More... | |
| const CPerm & | operator[] (int n) const |
| Look up power of permutation. More... | |
| const uint32_t | GetOrder () const |
| Get the order of the permutation. More... | |
Private Attributes | |
| std::vector< CPerm * > | m_stdPower |
| Table of powers. | |
| uint32_t | m_nOrder = 0 |
| Order of the underlying permutation. | |
The power table stores power of permutations as an optimization so that we don't have to keep recomputing them. We just keep computing powers until we get the identity permutation (which we eventually do because groups).
Definition at line 17 of file PowerTable.h.
| CPowerTable::~CPowerTable | ( | ) |
Delete all of the permutations we computed to fill the power table.
Definition at line 8 of file PowerTable.cpp.
| const uint32_t CPowerTable::GetOrder | ( | ) | const |
Reader function for the order of the permutation. Assumes that Initialize() has been called.
Definition at line 42 of file PowerTable.cpp.
| void CPowerTable::Initialize | ( | const CPerm & | p | ) |
Initialize the power table to hold all of the powers of a permutation up to one less than its order.
| p | The initial permutation. |
Definition at line 17 of file PowerTable.cpp.
| const CPerm & CPowerTable::operator[] | ( | int | n | ) | const |
Reader function for the permutation table. Assumes that Initialize() has been called.
| n | An exponent. |
Definition at line 51 of file PowerTable.cpp.
1.8.15