permutation class storing permutations as words of elementary Permutation 's More...
#include <permutationword.h>
Public Types | |
typedef std::vector< unsigned long > | perm |
typedef for permutation image | |
typedef std::vector< unsigned long > | perm |
typedef for permutation image | |
Public Member Functions | |
PermutationWord (unsigned int n) | |
constructs identity permutation acting on n elements | |
PermutationWord (unsigned int n, const std::string &cycles) | |
constructs permutation acting on n elements, given by string in cycle form | |
PermutationWord (const perm &p) | |
sort of copy constructor | |
PermutationWord (const PermutationWord &p) | |
copy constructor | |
PermutationWord | operator* (const PermutationWord &p) const |
permutation multiplication from the right | |
PermutationWord & | operator*= (const PermutationWord &p) |
permutation inplace multiplication from the right | |
PermutationWord & | operator^= (const PermutationWord &p) |
permutation inplace multiplication from the left | |
PermutationWord | operator~ () const |
permutation inversion | |
PermutationWord & | invertInplace () |
permutation inplace inversion | |
bool | operator== (const PermutationWord &p2) const |
equals operator | |
ulong | operator/ (ulong val) const |
lets permutation act on val | |
ulong | at (ulong val) const |
lets permutation act on val | |
ulong | operator% (ulong val) const |
lets inverse permutation act on val, i.e. compute j such that (this->at(j) == val) | |
bool | isIdentity (bool flush=false) const |
returns true if this permutation is identity | |
void | flush () |
force that permutation word is multiplied out | |
uint | size () const |
number of points this permutation acts on | |
PermutationWord (unsigned int n) | |
constructs identity permutation acting on n elements | |
PermutationWord (unsigned int n, const std::string &cycles) | |
constructs permutation acting on n elements, given by string in cycle form | |
PermutationWord (const perm &p) | |
sort of copy constructor | |
PermutationWord (const PermutationWord &p) | |
copy constructor | |
PermutationWord | operator* (const PermutationWord &p) const |
permutation multiplication from the right | |
PermutationWord & | operator*= (const PermutationWord &p) |
permutation inplace multiplication from the right | |
PermutationWord & | operator^= (const PermutationWord &p) |
permutation inplace multiplication from the left | |
PermutationWord | operator~ () const |
permutation inversion | |
PermutationWord & | invertInplace () |
permutation inplace inversion | |
bool | operator== (const PermutationWord &p2) const |
equals operator | |
ulong | operator/ (ulong val) const |
lets permutation act on val | |
ulong | at (ulong val) const |
lets permutation act on val | |
ulong | operator% (ulong val) const |
lets inverse permutation act on val, i.e. compute j such that (this->at(j) == val) | |
bool | isIdentity (bool flush=false) const |
returns true if this permutation is identity | |
void | flush () |
force that permutation word is multiplied out | |
uint | size () const |
number of points this permutation acts on | |
Static Public Member Functions | |
static ulong | elementsNumber () |
number of generators in the word generator pool | |
static void | clearStorage () |
deletes all elementary permutations from the storage. use ONLY if there is currently no PermutationWord in use anywhere | |
static ulong | elementsNumber () |
number of generators in the word generator pool | |
static void | clearStorage () |
deletes all elementary permutations from the storage. use ONLY if there is currently no PermutationWord in use anywhere | |
Friends | |
std::ostream & | operator<< (std::ostream &out, const PermutationWord &p) |
output | |
std::ostream & | operator<< (std::ostream &out, const PermutationWord &p) |
output |
permutation class storing permutations as words of elementary Permutation 's
interface compatible with Permutation
bool permlib::PermutationWord::isIdentity | ( | bool | flush = false |
) | const |
returns true if this permutation is identity
This is done by checking the image of every point, so the permutation word is multiplied out. After that the completely computed permutation is added as a new element to the word generator pool
bool permlib::PermutationWord::isIdentity | ( | bool | flush = false |
) | const [inline] |
returns true if this permutation is identity
This is done by checking the image of every point, so the permutation word is multiplied out. After that the completely computed permutation is added as a new element to the word generator pool
PermutationWord& permlib::PermutationWord::operator*= | ( | const PermutationWord & | p | ) |
permutation inplace multiplication from the right
i.e. THIS := THIS * p
PermutationWord & permlib::PermutationWord::operator*= | ( | const PermutationWord & | p | ) | [inline] |
permutation inplace multiplication from the right
i.e. THIS := THIS * p
PermutationWord& permlib::PermutationWord::operator^= | ( | const PermutationWord & | p | ) |
permutation inplace multiplication from the left
i.e. THIS := p * THIS
PermutationWord & permlib::PermutationWord::operator^= | ( | const PermutationWord & | p | ) | [inline] |
permutation inplace multiplication from the left
i.e. THIS := p * THIS