#include <Permutation.h>
Public Member Functions | |
| Permutation (int size=0) | |
| Default constructor (size specifies the size of the permutation). | |
| Permutation (int size, const int *p) | |
| Construct a permutation of the specified size given by the array p. | |
| Permutation (const vector< int > &p) | |
| Construct a permutation by a vector of numbers. | |
| template<class IntIterator> | |
| Permutation (const IntIterator &B, const IntIterator &E) | |
| Construct a permutation by a sequence of numbers. | |
| int | operator[] (int ind) const |
| Get the ith element of the permutation. | |
| int & | operator[] (int ind) |
| Get the reference to the ith element of the permutation. | |
| bool | operator== (const Permutation &p) const |
| Check if 2 permutations are equal. | |
| bool | operator!= (const Permutation &p) const |
| Check if 2 permutations are not equal. | |
| bool | operator< (const Permutation &p) const |
| Check if *this is strictly less than p (compared lexicographically). | |
| Permutation | operator * (const Permutation &p) const |
| Multiple 2 permutations. | |
| Permutation & | operator *= (const Permutation &p) |
| Multiple 1 permutation by another on the right. | |
| Permutation | operator- () const |
| Invert the permutation. | |
| Permutation | inverse () const |
| Invert the permutation. | |
| Permutation & | left_mult_by_cycle (const vector< int > &cycle) |
| A function used for computation of BKL normal forms of braids. | |
| void | change (int i, int j) |
| Swap the values at uth and jth position (multiply this by a cycle (i,j) on the left). | |
| const vector< int > & | getVector () const |
| Get the vector of numbers which represents the permutation. | |
| Permutation | power (int p) const |
| Raise the permutation into the power p. | |
| int | size () const |
| Get the size of the permutation. | |
| Permutation | increaseSize (int N) const |
| Increase the size of a permutation. | |
| int | length () const |
| Compute the length of a permutation (length of a geodesic). Current version is slow, need to update. | |
| int | difference (const Permutation &p) const |
| Compute the number of positions with different elements. | |
| Permutation | computeConjugacyClassRepresentative (Permutation &conj) const |
| Compute the conjugacy class representative (2 elements conjugate iff they have the same result of this function). | |
| Permutation | computeConjugator (const Permutation &p) const |
| Compute a conjugator for a couple of permutations (if permutations are not conjugate then the result makes no sense). | |
| Permutation | flip () const |
Flip the permutation (conjugate by a half-twist permutation ). | |
| Permutation | tinyFlip (int sh) const |
Perform a tiny flip (conjugate by ). | |
| bool | isTrivial () const |
| Check if the permutation is trivial. | |
| vector< int > | geodesic () const |
| Find a geodesic word representing the permutation. | |
| vector< int > | getWordPresentation () const |
| Compute the word presentation for a permutation which is "parallel descending cycles" (for other permutations it makes no sense). | |
| Permutation | RightGCD (const Permutation &p) const |
| Compute RightGCD of 2 permutations. | |
| Permutation | RightLCM (const Permutation &p) const |
| Compute RightLCM of 2 permutations. | |
| Permutation | LeftGCD (const Permutation &p) const |
| Compute LeftGCD of 2 permutations. | |
| Permutation | LeftLCM (const Permutation &p) const |
| Compute LeftLCM of 2 permutations. | |
| Permutation | meet2 (const Permutation &p) const |
| Compute GCD for 2 permutations that are "parallel descending cycles" (used for BKL Normal Forms of braids). | |
| Permutation | join2 (const Permutation &p) const |
| Compute LCM for 2 permutations that are "parallel descending cycles" (used for BKL Normal Forms of braids). | |
Static Public Member Functions | |
| static Permutation | CYCLE (int N, const vector< int > &cycle) |
| What is it? | |
| static void | lr_multiply_by_cycles (Permutation &P, Permutation &I, const vector< int > &M1, const vector< int > &M2) |
| A function used for computation of BKL normal forms of braids. | |
| static Permutation | random (int size) |
| Generate a random permutation of specified size. | |
| static Permutation | getHalfTwistPermutation (int size) |
Get half twist permutation . | |
| static Permutation | getCyclePermutation (int size) |
Get half twist permutation . | |
| static bool | mixable (const Permutation &p1, const Permutation &p2) |
| Check if 2 permutations are mixable (it is not used anywhere in the system, god knows that means). | |
Private Member Functions | |
| void | _sub_meet (const Permutation &p, const Permutation &ip1, const Permutation &ip2, Permutation &cur, int *left_indeces_a, int *left_indeces_b, int *right_indeces_a, int *right_indeces_b, int beg, int end) const |
| (Aux) The main operation to compute RightGCD and all other lattice functions | |
| void | prepare_pairs (int N, Permutation &P, vector< pair< int, int > > &pairs) const |
Private Attributes | |
| vector< int > | theValue |
| A vector representing the permutation. | |
Friends | |
| class | BraidGroup |
| ostream & | operator<< (ostream &os, const Permutation &p) |
Classes | |
| struct | triple |
We use the standard representation of a presentation on
symbols - a sequence of numbers
. Notice that indexes start at 0.
Definition at line 32 of file Permutation.h.
|
|
Default constructor (size specifies the size of the permutation).
|
|
||||||||||||
|
Construct a permutation of the specified size given by the array p.
|
|
|
Construct a permutation by a vector of numbers.
|
|
||||||||||||||||
|
Construct a permutation by a sequence of numbers.
Definition at line 54 of file Permutation.h. |
|
||||||||||||||||||||||||||||||||||||||||||||
|
(Aux) The main operation to compute RightGCD and all other lattice functions
|
|
||||||||||||
|
Swap the values at uth and jth position (multiply this by a cycle (i,j) on the left).
Definition at line 129 of file Permutation.h. References theValue. |
|
|
Compute the conjugacy class representative (2 elements conjugate iff they have the same result of this function).
|
|
|
Compute a conjugator for a couple of permutations (if permutations are not conjugate then the result makes no sense).
|
|
||||||||||||
|
What is it?
|
|
|
Compute the number of positions with different elements.
|
|
|
Flip the permutation (conjugate by a half-twist permutation
|
|
|
Find a geodesic word representing the permutation.
|
|
|
Get half twist permutation
|
|
|
Get half twist permutation
Referenced by ThLeftNormalForm::ThLeftNormalForm(), and ThRightNormalForm::ThRightNormalForm(). |
|
|
Get the vector of numbers which represents the permutation.
Definition at line 133 of file Permutation.h. References theValue. |
|
|
Compute the word presentation for a permutation which is "parallel descending cycles" (for other permutations it makes no sense).
|
|
|
Increase the size of a permutation.
|
|
|
Invert the permutation.
Referenced by operator-(). |
|
|
Check if the permutation is trivial.
Referenced by ThLeftNormalForm::ThLeftNormalForm(), and ThRightNormalForm::ThRightNormalForm(). |
|
|
Compute LCM for 2 permutations that are "parallel descending cycles" (used for BKL Normal Forms of braids).
|
|
|
A function used for computation of BKL normal forms of braids.
|
|
|
Compute LeftGCD of 2 permutations.
Let |
|
|
Compute LeftLCM of 2 permutations.
Let |
|
|
Compute the length of a permutation (length of a geodesic). Current version is slow, need to update.
|
|
||||||||||||||||||||
|
A function used for computation of BKL normal forms of braids.
|
|
|
Compute GCD for 2 permutations that are "parallel descending cycles" (used for BKL Normal Forms of braids).
|
|
||||||||||||
|
Check if 2 permutations are mixable (it is not used anywhere in the system, god knows that means).
|
|
|
Multiple 2 permutations.
|
|
|
Multiple 1 permutation by another on the right.
|
|
|
Check if 2 permutations are not equal.
|
|
|
Invert the permutation.
Definition at line 102 of file Permutation.h. References inverse(). |
|
|
Check if *this is strictly less than p (compared lexicographically).
|
|
|
Check if 2 permutations are equal.
|
|
|
Get the reference to the ith element of the permutation.
Definition at line 79 of file Permutation.h. References theValue. |
|
|
Get the ith element of the permutation.
Definition at line 75 of file Permutation.h. References theValue. |
|
|
Raise the permutation into the power p.
|
|
||||||||||||||||
|
|
|
|
Generate a random permutation of specified size.
|
|
|
Compute RightGCD of 2 permutations.
Let |
|
|
Compute RightLCM of 2 permutations.
Let |
|
|
Get the size of the permutation.
Definition at line 141 of file Permutation.h. References theValue. Referenced by ThLeftNormalForm::ThLeftNormalForm(), and ThRightNormalForm::ThRightNormalForm(). |
|
|
Perform a tiny flip (conjugate by
|
|
|
Definition at line 301 of file Permutation.h. |
|
||||||||||||
|
|
|
|
A vector representing the permutation.
Definition at line 306 of file Permutation.h. Referenced by change(), getVector(), operator[](), and size(). |
1.4.6