permlib::Permutation Class Reference

Permutation class storing all values explicitly. More...

#include <permutation.h>

List of all members.

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

 Permutation (unsigned int n)
 constructs identity permutation acting on n elements
 Permutation (unsigned int n, const std::string &cycles)
 constructs permutation acting on n elements, given by string in cycle form
 Permutation (const perm &p)
 sort of copy constructor
 Permutation (const Permutation &p)
 copy constructor
Permutation operator* (const Permutation &p) const
 permutation multiplication from the right
Permutationoperator*= (const Permutation &p)
 permutation inplace multiplication from the right
Permutationoperator^= (const Permutation &p)
 permutation inplace multiplication from the left
Permutation operator~ () const
 permutation inversion
PermutationinvertInplace ()
 permutation inplace inversion
bool operator== (const Permutation &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 () const
 returns true if this permutation is identity
void flush ()
 dummy stub for interface compatability with PermutationWord
uint size () const
 number of points this permutation acts on
void setTransposition (uint pos, uint val)
 updates this permutation such that pos is mapped onto val and val onto pos
 Permutation (unsigned int n)
 constructs identity permutation acting on n elements
 Permutation (unsigned int n, const std::string &cycles)
 constructs permutation acting on n elements, given by string in cycle form
 Permutation (const perm &p)
 sort of copy constructor
 Permutation (const Permutation &p)
 copy constructor
Permutation operator* (const Permutation &p) const
 permutation multiplication from the right
Permutationoperator*= (const Permutation &p)
 permutation inplace multiplication from the right
Permutationoperator^= (const Permutation &p)
 permutation inplace multiplication from the left
Permutation operator~ () const
 permutation inversion
PermutationinvertInplace ()
 permutation inplace inversion
bool operator== (const Permutation &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 () const
 returns true if this permutation is identity
void flush ()
 dummy stub for interface compatability with PermutationWord
uint size () const
 number of points this permutation acts on
void setTransposition (uint pos, uint val)

Protected Member Functions

 Permutation (unsigned int n, bool)
 INTERNAL ONLY: constructs an "empty" permutation, i.e. without element mapping.
 Permutation (unsigned int n, bool)
 INTERNAL ONLY: constructs an "empty" permutation, i.e. without element mapping.

Protected Attributes

perm m_perm
 defintion of permutation behavior
bool m_isIdentity
 if set to true, permutation is identity; if set to false then it is not known whether this is identity;

Friends

std::ostream & operator<< (std::ostream &out, const Permutation &p)
 output in cycle form
std::ostream & operator<< (std::ostream &out, const Permutation &p)
 output in cycle form

Detailed Description

Permutation class storing all values explicitly.


Member Function Documentation

bool permlib::Permutation::isIdentity (  )  const

returns true if this permutation is identity

This is done by checking the image of every point.

bool permlib::Permutation::isIdentity (  )  const [inline]

returns true if this permutation is identity

This is done by checking the image of every point.

Permutation& permlib::Permutation::operator*= ( const Permutation p  ) 

permutation inplace multiplication from the right

i.e. THIS := THIS * p

Permutation & permlib::Permutation::operator*= ( const Permutation p  )  [inline]

permutation inplace multiplication from the right

i.e. THIS := THIS * p

Permutation& permlib::Permutation::operator^= ( const Permutation p  ) 

permutation inplace multiplication from the left

i.e. THIS := p * THIS

Permutation & permlib::Permutation::operator^= ( const Permutation p  )  [inline]

permutation inplace multiplication from the left

i.e. THIS := p * THIS


The documentation for this class was generated from the following files:
Generated on Fri Jun 18 21:59:47 2010 for PermLib by  doxygen 1.6.3