#include <ngluingperms.h>
Public Member Functions | |
NGluingPerms (const NGluingPerms &cloneMe) | |
Creates a new set of gluing permutations that is a clone of the given permutation set. | |
NGluingPerms (std::istream &in) | |
Reads a new set of gluing permutations from the given input stream. | |
virtual | ~NGluingPerms () |
Deallocates any memory used by this structure. | |
bool | inputError () const |
Was an error found during construction from an input stream? | |
unsigned | getNumberOfTetrahedra () const |
Returns the total number of tetrahedra under consideration. | |
const NFacePairing * | getFacePairing () const |
Returns the specific pairing of tetrahedron faces that this set of gluing permutations complements. | |
NPerm | gluingPerm (const NTetFace &source) const |
Returns the gluing permutation associated with the given tetrahedron face. | |
NPerm | gluingPerm (unsigned tet, unsigned face) const |
Returns the gluing permutation associated with the given tetrahedron face. | |
NTriangulation * | triangulate () const |
Returns a newly created triangulation as modelled by this set of gluing permutations and the associated tetrahedron face pairing. | |
virtual void | dumpData (std::ostream &out) const |
Dumps all internal data in a plain text format to the given output stream. | |
Protected Member Functions | |
NGluingPerms (const NFacePairing *newPairing) | |
Creates a new permutation set. | |
int & | permIndex (const NTetFace &source) |
Returns the index into array allPermsS3 describing how the the given face is joined to its partner. | |
int & | permIndex (unsigned tet, unsigned face) |
Returns the index into array allPermsS3 describing how the the given face is joined to its partner. | |
const int & | permIndex (const NTetFace &source) const |
Returns the index into array allPermsS3 describing how the the given face is joined to its partner. | |
const int & | permIndex (unsigned tet, unsigned face) const |
Returns the index into array allPermsS3 describing how the the given face is joined to its partner. | |
int | gluingToIndex (const NTetFace &source, const NPerm &gluing) const |
Returns the index into array allPermsS3 corresponding to the given gluing permutation from the given face to its partner. | |
int | gluingToIndex (unsigned tet, unsigned face, const NPerm &gluing) const |
Returns the index into array allPermsS3 corresponding to the given gluing permutation from the given face to its partner. | |
NPerm | indexToGluing (const NTetFace &source, int index) const |
Returns the gluing permutation from the given face to its partner that corresponds to the given index into array allPermsS3. | |
NPerm | indexToGluing (unsigned tet, unsigned face, int index) const |
Returns the gluing permutation from the given face to its partner that corresponds to the given index into array allPermsS3. | |
Protected Attributes | |
const NFacePairing * | pairing |
The face pairing complemented by this permutation set. | |
int * | permIndices |
The index into array allPermsS3 describing how each tetrahedron face is glued to its partner. | |
bool | inputError_ |
Has an error occurred during construction from an input stream? |
Given a pairwise matching of faces (as described by class NFacePairing), each face that is matched with some other face will have an associated permutation of four elements (as described by class NPerm).
If a face is matched with some other face, the two corresponding associated permutations will be inverses. If a face is left deliberately unmatched, it will have no associated permutation.
Such a set of permutations models part of the structure of a triangulation, in which each tetrahedron face that is glued to another face has a corresponding gluing permutation (and the matched face has the inverse gluing permutation).
regina::NGluingPerms::NGluingPerms | ( | const NGluingPerms & | cloneMe | ) |
Creates a new set of gluing permutations that is a clone of the given permutation set.
cloneMe | the gluing permutations to clone. |
regina::NGluingPerms::NGluingPerms | ( | std::istream & | in | ) |
Reads a new set of gluing permutations from the given input stream.
This routine reads data in the format written by dumpData().
If the data found in the input stream is invalid or incorrectly formatted, the routine inputError() will return true
but the contents of this object will be otherwise undefined.
in | the input stream from which to read. |
regina::NGluingPerms::~NGluingPerms | ( | ) | [inline, virtual] |
Deallocates any memory used by this structure.
regina::NGluingPerms::NGluingPerms | ( | const NFacePairing * | newPairing | ) | [inline, protected] |
Creates a new permutation set.
All internal arrays will be allocated but not initialised.
The given face pairing is in canonical form as described by NFacePairing::isCanonical(). Note that all face pairings constructed by NFacePairing::findAllPairings() are of this form.
newPairing | the specific pairing of tetrahedron faces that this permutation set will complement. |
bool regina::NGluingPerms::inputError | ( | ) | const [inline] |
Was an error found during construction from an input stream?
This routine returns true
if an input stream constructor was used to create this object but the data in the input stream was invalid or incorrectly formatted.
If a different constructor was called (i.e., no input stream was used), then this routine will always return false
.
true
if an error occurred during construction from an input stream, or false
otherwise. unsigned regina::NGluingPerms::getNumberOfTetrahedra | ( | ) | const [inline] |
Returns the total number of tetrahedra under consideration.
const NFacePairing * regina::NGluingPerms::getFacePairing | ( | ) | const [inline] |
Returns the specific pairing of tetrahedron faces that this set of gluing permutations complements.
Returns the gluing permutation associated with the given tetrahedron face.
The given face is a real tetrahedron face (not boundary, before-the-start or past-the-end).
source | the tetrahedron face under investigation. |
NPerm regina::NGluingPerms::gluingPerm | ( | unsigned | tet, | |
unsigned | face | |||
) | const [inline] |
Returns the gluing permutation associated with the given tetrahedron face.
tet | the tetrahedron under investigation (this must be strictly less than the total number of tetrahedra under consideration). | |
face | the face of the given tetrahedron under investigation (between 0 and 3 inclusive). |
NTriangulation* regina::NGluingPerms::triangulate | ( | ) | const |
Returns a newly created triangulation as modelled by this set of gluing permutations and the associated tetrahedron face pairing.
Each matched pair of faces and their associated permutations will be realised as two tetrahedron faces glued together with the corresponding gluing permutation. Each unmatched face will be realised as a boundary tetrahedron face.
It is the responsibility of the caller of this routine to delete this triangulation once it is no longer required.
virtual void regina::NGluingPerms::dumpData | ( | std::ostream & | out | ) | const [virtual] |
Dumps all internal data in a plain text format to the given output stream.
This object can be recreated from this text data by calling the input stream constructor for this class.
This routine may be useful for transferring objects from one processor to another.
Note that subclass data is written after superclass data, so it is safe to dump data from a subclass and then recreate a new superclass object from that data (though subclass-specific information will of course be lost).
out | the output stream to which the data should be written. |
Reimplemented in regina::NGluingPermSearcher, and regina::NClosedPrimeMinSearcher.
int & regina::NGluingPerms::permIndex | ( | const NTetFace & | source | ) | [inline, protected] |
Returns the index into array allPermsS3 describing how the the given face is joined to its partner.
Note that this permutation is not a gluing permutation as such, but rather a permutation of 0, 1 and 2 only. For a real face gluing permutation, see routine gluingPerm().
source | the tetrahedron face under investigation. |
int & regina::NGluingPerms::permIndex | ( | unsigned | tet, | |
unsigned | face | |||
) | [inline, protected] |
Returns the index into array allPermsS3 describing how the the given face is joined to its partner.
Note that this permutation is not a gluing permutation as such, but rather a permutation of 0, 1 and 2 only. For a real face gluing permutation, see routine gluingPerm().
tet | the tetrahedron under investigation (this must be strictly less than the total number of tetrahedra under consideration). | |
face | the face of the given tetrahedron under investigation (between 0 and 3 inclusive). |
const int & regina::NGluingPerms::permIndex | ( | const NTetFace & | source | ) | const [inline, protected] |
Returns the index into array allPermsS3 describing how the the given face is joined to its partner.
Note that this permutation is not a gluing permutation as such, but rather a permutation of 0, 1 and 2 only. For a real face gluing permutation, see routine gluingPerm().
source | the tetrahedron face under investigation. |
const int & regina::NGluingPerms::permIndex | ( | unsigned | tet, | |
unsigned | face | |||
) | const [inline, protected] |
Returns the index into array allPermsS3 describing how the the given face is joined to its partner.
Note that this permutation is not a gluing permutation as such, but rather a permutation of 0, 1 and 2 only. For a real face gluing permutation, see routine gluingPerm().
tet | the tetrahedron under investigation (this must be strictly less than the total number of tetrahedra under consideration). | |
face | the face of the given tetrahedron under investigation (between 0 and 3 inclusive). |
int regina::NGluingPerms::gluingToIndex | ( | const NTetFace & | source, | |
const NPerm & | gluing | |||
) | const [protected] |
Returns the index into array allPermsS3 corresponding to the given gluing permutation from the given face to its partner.
This need not be the index into allPermsS3 that is currently stored for the given face.
Indices into array allPermsS3 are stored internally in the array permIndices. Full gluing permutations on the other hand are used in constructing triangulations.
If the given tetrahedron face and its partner are faces x and y of their respective tetrahedra, then the given gluing permutation maps x to y.
source | the tetrahedron face under investigation. | |
gluing | a possible gluing permutation from the given tetrahedron face to its partner according to the underlying face pairing. |
int regina::NGluingPerms::gluingToIndex | ( | unsigned | tet, | |
unsigned | face, | |||
const NPerm & | gluing | |||
) | const [protected] |
Returns the index into array allPermsS3 corresponding to the given gluing permutation from the given face to its partner.
This need not be the index into allPermsS3 that is currently stored for the given face.
Indices into array allPermsS3 are stored internally in the array permIndices. Full gluing permutations on the other hand are used in constructing triangulations.
If the given tetrahedron face and its partner are faces x and y of their respective tetrahedra, then the given gluing permutation maps x to y.
tet | the tetrahedron under investigation; this must be strictly less than the total number of tetrahedra under consideration. | |
face | the face of the given tetrahedron under investigation; this must be between 0 and 3 inclusive. | |
gluing | a possible gluing permutation from the given tetrahedron face to its partner according to the underlying face pairing. |
NPerm regina::NGluingPerms::indexToGluing | ( | const NTetFace & | source, | |
int | index | |||
) | const [inline, protected] |
Returns the gluing permutation from the given face to its partner that corresponds to the given index into array allPermsS3.
This index into allPermsS3 need not be the index that is currently stored for the given face.
Indices into array allPermsS3 are stored internally in the array permIndices. Full gluing permutations on the other hand are used in constructing triangulations.
If the given tetrahedron face and its partner according to the underlying face pairing are faces x and y of their respective tetrahedra, then the resulting gluing permutation will map x to y.
source | the tetrahedron face under investigation. | |
index | an index into allPermsS3; this must be between 0 and 5 inclusive. |
NPerm regina::NGluingPerms::indexToGluing | ( | unsigned | tet, | |
unsigned | face, | |||
int | index | |||
) | const [inline, protected] |
Returns the gluing permutation from the given face to its partner that corresponds to the given index into array allPermsS3.
This index into allPermsS3 need not be the index that is currently stored for the given face.
Indices into array allPermsS3 are stored internally in the array permIndices. Full gluing permutations on the other hand are used in constructing triangulations.
If the given tetrahedron face and its partner according to the underlying face pairing are faces x and y of their respective tetrahedra, then the resulting gluing permutation will map x to y.
tet | the tetrahedron under investigation; this must be strictly less than the total number of tetrahedra under consideration. | |
face | the face of the given tetrahedron under investigation; this must be between 0 and 3 inclusive. | |
index | an index into allPermsS3; this must be between 0 and 5 inclusive. |
const NFacePairing* regina::NGluingPerms::pairing [protected] |
The face pairing complemented by this permutation set.
This is guaranteed to be the minimal representative of its face pairing isomorphism class.
int* regina::NGluingPerms::permIndices [protected] |
The index into array allPermsS3 describing how each tetrahedron face is glued to its partner.
Note that this is not a gluing permutation as such but rather a permutation of 0, 1 and 2 only (see the routines gluingToIndex() and indexToGluing() for conversions). If a permutation has not yet been selected (e.g., if this permutation set is still under construction) then this index is -1.
bool regina::NGluingPerms::inputError_ [protected] |
Has an error occurred during construction from an input stream?