permlib
0.2.9
Library for permutation computations
|
permutation class storing permutations as words of elementary Permutation 's More...
#include <permutationword.h>
Public Types | |
typedef Permutation::perm | perm |
typedef for permutation image | |
typedef boost::shared_ptr< PermutationWord > | ptr |
boost shared_ptr of this class | |
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 More... | |
PermutationWord & | operator^= (const PermutationWord &p) |
permutation inplace multiplication from the left More... | |
PermutationWord | operator~ () const |
permutation inversion | |
PermutationWord & | invertInplace () |
permutation inplace inversion | |
bool | operator== (const PermutationWord &p2) const |
equals operator | |
unsigned long | operator/ (unsigned long val) const |
lets permutation act on val | |
unsigned long | at (unsigned long val) const |
lets permutation act on val | |
unsigned long | operator% (unsigned long 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 More... | |
void | flush () |
force that permutation word is multiplied out | |
unsigned int | size () const |
number of points this permutation acts on | |
Static Public Member Functions | |
static unsigned long | 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 | |
permutation class storing permutations as words of elementary Permutation 's
interface compatible with Permutation
|
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
|
inline |
permutation inplace multiplication from the right
i.e. THIS := THIS * p
|
inline |
permutation inplace multiplication from the left
i.e. THIS := p * THIS