permlib  0.2.9
Library for permutation computations
Public Types | Public Member Functions | Static Public Member Functions | Friends | List of all members
permlib::PermutationWord Class Reference

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< PermutationWordptr
 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
 
PermutationWordoperator*= (const PermutationWord &p)
 permutation inplace multiplication from the right More...
 
PermutationWordoperator^= (const PermutationWord &p)
 permutation inplace multiplication from the left More...
 
PermutationWord operator~ () const
 permutation inversion
 
PermutationWordinvertInplace ()
 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
 

Detailed Description

permutation class storing permutations as words of elementary Permutation 's

interface compatible with Permutation

Member Function Documentation

◆ isIdentity()

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

◆ operator*=()

PermutationWord & permlib::PermutationWord::operator*= ( const PermutationWord p)
inline

permutation inplace multiplication from the right

i.e. THIS := THIS * p

◆ operator^=()

PermutationWord & permlib::PermutationWord::operator^= ( const PermutationWord p)
inline

permutation inplace multiplication from the left

i.e. THIS := p * THIS


The documentation for this class was generated from the following file: