Regina Calculation Engine
Public Member Functions | Protected Member Functions | Protected Attributes
regina::NGluingPerms Class Reference

Represents a specific set of gluing permutations to complement a particular pairwise matching of tetrahedron faces. More...

#include <census/ngluingperms.h>

Inheritance diagram for regina::NGluingPerms:
regina::NGluingPermSearcher regina::NCompactSearcher regina::NClosedPrimeMinSearcher

List of all members.

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 NFacePairinggetFacePairing () const
 Returns the specific pairing of tetrahedron faces that this set of gluing permutations complements.
NPerm4 gluingPerm (const NTetFace &source) const
 Returns the gluing permutation associated with the given tetrahedron face.
NPerm4 gluingPerm (unsigned tet, unsigned face) const
 Returns the gluing permutation associated with the given tetrahedron face.
NTriangulationtriangulate () 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 NPerm4::S3 describing how the the given face is joined to its partner.
int & permIndex (unsigned tet, unsigned face)
 Returns the index into array NPerm4::S3 describing how the the given face is joined to its partner.
const int & permIndex (const NTetFace &source) const
 Returns the index into array NPerm4::S3 describing how the the given face is joined to its partner.
const int & permIndex (unsigned tet, unsigned face) const
 Returns the index into array NPerm4::S3 describing how the the given face is joined to its partner.
int gluingToIndex (const NTetFace &source, const NPerm4 &gluing) const
 Returns the index into array NPerm4::S3 corresponding to the given gluing permutation from the given face to its partner.
int gluingToIndex (unsigned tet, unsigned face, const NPerm4 &gluing) const
 Returns the index into array NPerm4::S3 corresponding to the given gluing permutation from the given face to its partner.
NPerm4 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 NPerm4::S3.
NPerm4 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 NPerm4::S3.

Protected Attributes

const NFacePairingpairing
 The face pairing that this permutation set complements.
int * permIndices
 The index into array NPerm4::S3 describing how each tetrahedron face is glued to its partner.
bool inputError_
 Has an error occurred during construction from an input stream?

Detailed Description

Represents a specific set of gluing permutations to complement a particular pairwise matching of tetrahedron faces.

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 NPerm4).

If a face is matched with some other face, the two associated permutations in this set will be inverses. If a face is left deliberately unmatched, it will have no associated permutation in this set.

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).

Python:
Not present.

Constructor & Destructor Documentation

Creates a new set of gluing permutations that is a clone of the given permutation set.

Parameters:
cloneMethe 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.

Warning:
The data format is liable to change between Regina releases. Data in this format should be used on a short-term temporary basis only.
Parameters:
inthe 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.

Precondition:
The given face pairing is connected, i.e., it is possible to reach any tetrahedron from any other tetrahedron via a series of matched face pairs.
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.
Parameters:
newPairingthe specific pairing of tetrahedron faces that this permutation set will complement.

Member Function Documentation

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).

Warning:
The data format is liable to change between Regina releases. Data in this format should be used on a short-term temporary basis only.
Parameters:
outthe output stream to which the data should be written.

Reimplemented in regina::NClosedPrimeMinSearcher, regina::NCompactSearcher, and regina::NGluingPermSearcher.

Returns the specific pairing of tetrahedron faces that this set of gluing permutations complements.

Returns:
the corresponding tetrahedron face pairing.
unsigned regina::NGluingPerms::getNumberOfTetrahedra ( ) const [inline]

Returns the total number of tetrahedra under consideration.

Returns:
the number of tetrahedra under consideration.
NPerm4 regina::NGluingPerms::gluingPerm ( const NTetFace source) const [inline]

Returns the gluing permutation associated with the given tetrahedron face.

Precondition:
The given face is actually paired with some other face in the underlying pairwise matching (see routine getFacePairing()).
The given face is a real tetrahedron face (not boundary, before-the-start or past-the-end).
Parameters:
sourcethe tetrahedron face under investigation.
Returns:
the associated gluing permutation.
NPerm4 regina::NGluingPerms::gluingPerm ( unsigned  tet,
unsigned  face 
) const [inline]

Returns the gluing permutation associated with the given tetrahedron face.

Precondition:
The given face is actually paired with some other face in the underlying pairwise matching (see routine getFacePairing()).
Parameters:
tetthe tetrahedron under investigation (this must be strictly less than the total number of tetrahedra under consideration).
facethe face of the given tetrahedron under investigation (between 0 and 3 inclusive).
Returns:
the associated gluing permutation.
int regina::NGluingPerms::gluingToIndex ( const NTetFace source,
const NPerm4 gluing 
) const [protected]

Returns the index into array NPerm4::S3 corresponding to the given gluing permutation from the given face to its partner.

This need not be the index into NPerm4::S3 that is currently stored for the given face.

Indices into array NPerm4::S3 are stored internally in the array permIndices. Full gluing permutations on the other hand are used in constructing triangulations.

Precondition:
The given tetrahedron face has a partner according to the underlying face pairing, i.e., is not a boundary face.
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.
Parameters:
sourcethe tetrahedron face under investigation.
gluinga possible gluing permutation from the given tetrahedron face to its partner according to the underlying face pairing.
Returns:
the index into NPerm4::S3 corresponding to the given gluing permutation; this will be between 0 and 5 inclusive.
int regina::NGluingPerms::gluingToIndex ( unsigned  tet,
unsigned  face,
const NPerm4 gluing 
) const [protected]

Returns the index into array NPerm4::S3 corresponding to the given gluing permutation from the given face to its partner.

This need not be the index into NPerm4::S3 that is currently stored for the given face.

Indices into array NPerm4::S3 are stored internally in the array permIndices. Full gluing permutations on the other hand are used in constructing triangulations.

Precondition:
The given tetrahedron face has a partner according to the underlying face pairing, i.e., is not a boundary face.
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.
Parameters:
tetthe tetrahedron under investigation; this must be strictly less than the total number of tetrahedra under consideration.
facethe face of the given tetrahedron under investigation; this must be between 0 and 3 inclusive.
gluinga possible gluing permutation from the given tetrahedron face to its partner according to the underlying face pairing.
Returns:
the index into NPerm4::S3 corresponding to the given gluing permutation; this will be between 0 and 5 inclusive.
NPerm4 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 NPerm4::S3.

This index into NPerm4::S3 need not be the index that is currently stored for the given face.

Indices into array NPerm4::S3 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.

Precondition:
The given tetrahedron face has a partner according to the underlying face pairing, i.e., is not a boundary face.
Parameters:
sourcethe tetrahedron face under investigation.
indexan index into NPerm4::S3; this must be between 0 and 5 inclusive.
Returns:
the gluing permutation corresponding to the given index into NPerm4::S3.
NPerm4 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 NPerm4::S3.

This index into NPerm4::S3 need not be the index that is currently stored for the given face.

Indices into array NPerm4::S3 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.

Precondition:
The given tetrahedron face has a partner according to the underlying face pairing, i.e., is not a boundary face.
Parameters:
tetthe tetrahedron under investigation; this must be strictly less than the total number of tetrahedra under consideration.
facethe face of the given tetrahedron under investigation; this must be between 0 and 3 inclusive.
indexan index into NPerm4::S3; this must be between 0 and 5 inclusive.
Returns:
the gluing permutation corresponding to the given index into NPerm4::S3.
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.

Returns:
true if an error occurred during construction from an input stream, or false otherwise.
int & regina::NGluingPerms::permIndex ( const NTetFace source) [inline, protected]

Returns the index into array NPerm4::S3 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().

Precondition:
The given face is a real tetrahedron face (not boundary, before-the-start or past-the-end).
Parameters:
sourcethe tetrahedron face under investigation.
Returns:
a reference to the corresponding array index.
int & regina::NGluingPerms::permIndex ( unsigned  tet,
unsigned  face 
) [inline, protected]

Returns the index into array NPerm4::S3 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().

Parameters:
tetthe tetrahedron under investigation (this must be strictly less than the total number of tetrahedra under consideration).
facethe face of the given tetrahedron under investigation (between 0 and 3 inclusive).
Returns:
a reference to the corresponding array index.
const int & regina::NGluingPerms::permIndex ( const NTetFace source) const [inline, protected]

Returns the index into array NPerm4::S3 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().

Precondition:
The given face is a real tetrahedron face (not boundary, before-the-start or past-the-end).
Parameters:
sourcethe tetrahedron face under investigation.
Returns:
a reference to the corresponding array index.
const int & regina::NGluingPerms::permIndex ( unsigned  tet,
unsigned  face 
) const [inline, protected]

Returns the index into array NPerm4::S3 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().

Parameters:
tetthe tetrahedron under investigation (this must be strictly less than the total number of tetrahedra under consideration).
facethe face of the given tetrahedron under investigation (between 0 and 3 inclusive).
Returns:
a reference to the corresponding array index.

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.

Returns:
a newly created triangulation modelled by this structure.

Member Data Documentation

Has an error occurred during construction from an input stream?

The face pairing that this permutation set complements.

This is guaranteed to be the minimal representative of its face pairing isomorphism class.

The index into array NPerm4::S3 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.


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

Copyright © 1999-2012, The Regina development team
This software is released under the GNU General Public License.
For further information, or to submit a bug or other problem, please contact Ben Burton (bab@debian.org).