#include <ntriangulation.h>
Inheritance diagram for regina::NTriangulation:
Public Types | |
typedef NIndexedArray< NTetrahedron *, HashPointer >::const_iterator | TetrahedronIterator |
Used to iterate through tetrahedra. | |
typedef NIndexedArray< NFace *, HashPointer >::const_iterator | FaceIterator |
Used to iterate through faces. | |
typedef NIndexedArray< NEdge *, HashPointer >::const_iterator | EdgeIterator |
Used to iterate through edges. | |
typedef NIndexedArray< NVertex *, HashPointer >::const_iterator | VertexIterator |
Used to iterate through vertices. | |
typedef NIndexedArray< NComponent *, HashPointer >::const_iterator | ComponentIterator |
Used to iterate through components. | |
typedef NIndexedArray< NBoundaryComponent *, HashPointer >::const_iterator | BoundaryComponentIterator |
Used to iterate through boundary components. | |
typedef std::map< std::pair< unsigned long, unsigned long >, double > | TuraevViroSet |
A map from (r, whichRoot) pairs to Turaev-Viro invariants. | |
Public Member Functions | |
Constructors and Destructors | |
NTriangulation () | |
Default constructor. | |
NTriangulation (const NTriangulation &cloneMe) | |
Copy constructor. | |
virtual | ~NTriangulation () |
Destroys this triangulation. | |
Packet Administration | |
virtual int | getPacketType () const |
Returns the integer ID representing this type of packet. | |
virtual std::string | getPacketTypeName () const |
Returns an English name for this type of packet. | |
virtual void | writePacket (NFile &out) const |
Writes the packet details to the given old-style binary file. | |
virtual void | writeTextShort (std::ostream &out) const |
Writes this object in short text format to the given output stream. | |
virtual void | writeTextLong (std::ostream &out) const |
Writes this object in long text format to the given output stream. | |
virtual bool | dependsOnParent () const |
Determines if this packet depends upon its parent. | |
virtual void | readIndividualProperty (NFile &infile, unsigned propType) |
Reads an individual property from an old-style binary file. | |
Tetrahedra | |
unsigned long | getNumberOfTetrahedra () const |
Returns the number of tetrahedra in the triangulation. | |
const NIndexedArray< NTetrahedron *, HashPointer > & | getTetrahedra () const |
Returns all tetrahedra in the triangulation. | |
NTetrahedron * | getTetrahedron (unsigned long index) |
Returns the tetrahedron with the given index number in the triangulation. | |
const NTetrahedron * | getTetrahedron (unsigned long index) const |
Returns the tetrahedron with the given index number in the triangulation. | |
unsigned long | getTetrahedronIndex (const NTetrahedron *tet) const |
Returns the index of the given tetrahedron in the triangulation. | |
void | addTetrahedron (NTetrahedron *tet) |
Inserts the given tetrahedron into the triangulation. | |
NTetrahedron * | removeTetrahedron (NTetrahedron *tet) |
Removes the given tetrahedron from the triangulation. | |
NTetrahedron * | removeTetrahedronAt (unsigned long index) |
Removes the tetrahedron with the given index number from the triangulation. | |
void | removeAllTetrahedra () |
Removes all tetrahedra from the triangulation. | |
void | gluingsHaveChanged () |
This must be called whenever the gluings of tetrahedra are changed! Clears appropriate properties and performs other necessary tasks. | |
Skeletal Queries | |
unsigned long | getNumberOfBoundaryComponents () const |
Returns the number of boundary components in this triangulation. | |
unsigned long | getNumberOfComponents () const |
Returns the number of components in this triangulation. | |
unsigned long | getNumberOfVertices () const |
Returns the number of vertices in this triangulation. | |
unsigned long | getNumberOfEdges () const |
Returns the number of edges in this triangulation. | |
unsigned long | getNumberOfFaces () const |
Returns the number of faces in this triangulation. | |
const NIndexedArray< NComponent *, HashPointer > & | getComponents () const |
Returns all components of this triangulation. | |
const NIndexedArray< NBoundaryComponent *, HashPointer > & | getBoundaryComponents () const |
Returns all boundary components of this triangulation. | |
const NIndexedArray< NVertex *, HashPointer > & | getVertices () const |
Returns all vertices of this triangulation. | |
const NIndexedArray< NEdge *, HashPointer > & | getEdges () const |
Returns all edges of this triangulation. | |
const NIndexedArray< NFace *, HashPointer > & | getFaces () const |
Returns all faces of this triangulation. | |
NComponent * | getComponent (unsigned long index) const |
Returns the requested triangulation component. | |
NBoundaryComponent * | getBoundaryComponent (unsigned long index) const |
Returns the requested triangulation boundary component. | |
NVertex * | getVertex (unsigned long index) const |
Returns the requested triangulation vertex. | |
NEdge * | getEdge (unsigned long index) const |
Returns the requested triangulation edge. | |
NFace * | getFace (unsigned long index) const |
Returns the requested triangulation face. | |
unsigned long | getComponentIndex (const NComponent *component) const |
Returns the index of the given component in the triangulation. | |
unsigned long | getBoundaryComponentIndex (const NBoundaryComponent *bc) const |
Returns the index of the given boundary component in the triangulation. | |
unsigned long | getVertexIndex (const NVertex *vertex) const |
Returns the index of the given vertex in the triangulation. | |
unsigned long | getEdgeIndex (const NEdge *edge) const |
Returns the index of the given edge in the triangulation. | |
unsigned long | getFaceIndex (const NFace *face) const |
Returns the index of the given face in the triangulation. | |
std::auto_ptr< NIsomorphism > | isIsomorphicTo (const NTriangulation &other) const |
Determines if this triangulation is combinatorially isomorphic to the given triangulation. | |
std::auto_ptr< NIsomorphism > | isContainedIn (const NTriangulation &other) const |
Determines if an isomorphic copy of this triangulation is contained within the given triangulation, possibly as a subcomplex of some larger component (or components). | |
bool | hasTwoSphereBoundaryComponents () const |
Determines if this triangulation contains any two-sphere boundary components. | |
bool | hasNegativeIdealBoundaryComponents () const |
Determines if this triangulation contains any ideal boundary components with negative Euler characteristic. | |
Basic Properties | |
long | getEulerCharacteristic () const |
Returns the Euler characteristic of this triangulation. | |
bool | isValid () const |
Determines if this triangulation is valid. | |
bool | isIdeal () const |
Determines if this triangulation is ideal. | |
bool | isStandard () const |
Determines if this triangulation is standard. | |
bool | hasBoundaryFaces () const |
Determines if this triangulation has any boundary faces. | |
bool | isClosed () const |
Determines if this triangulation is closed. | |
bool | isOrientable () const |
Determines if this triangulation is orientable. | |
bool | isConnected () const |
Determines if this triangulation is connected. | |
Algebraic Properties | |
const NGroupPresentation & | getFundamentalGroup () const |
Returns the fundamental group of this triangulation. | |
void | simplifiedFundamentalGroup (NGroupPresentation *newGroup) |
Notifies the triangulation that you have simplified the presentation of its fundamental group. | |
const NAbelianGroup & | getHomologyH1 () const |
Returns the first homology group for this triangulation. | |
const NAbelianGroup & | getHomologyH1Rel () const |
Returns the relative first homology group with respect to the boundary for this triangulation. | |
const NAbelianGroup & | getHomologyH1Bdry () const |
Returns the first homology group of the boundary for this triangulation. | |
const NAbelianGroup & | getHomologyH2 () const |
Returns the second homology group for this triangulation. | |
unsigned long | getHomologyH2Z2 () const |
Returns the second homology group with coefficients in Z_2 for this triangulation. | |
double | turaevViro (unsigned long r, unsigned long whichRoot) const |
Computes the Turaev-Viro state sum invariant of this 3-manifold based upon the given initial data. | |
const TuraevViroSet & | allCalculatedTuraevViro () const |
Returns the set of all Turaev-Viro state sum invariants that have already been calculated for this 3-manifold. | |
Normal Surface Properties | |
bool | isZeroEfficient () |
Determines if this triangulation is 0-efficient. | |
bool | knowsZeroEfficient () const |
Is it already known whether or not this triangulation is 0-efficient? See isZeroEfficient() for further details. | |
bool | hasSplittingSurface () |
Determines whether this triangulation has a normal splitting surface. | |
bool | knowsSplittingSurface () const |
Is it already known whether or not this triangulation has a splitting surface? See hasSplittingSurface() for further details. | |
Skeletal Transformations | |
void | maximalForestInBoundary (stdhash::hash_set< NEdge *, HashPointer > &edgeSet, stdhash::hash_set< NVertex *, HashPointer > &vertexSet) const |
Produces a maximal forest in the 1-skeleton of the triangulation boundary. | |
void | maximalForestInSkeleton (stdhash::hash_set< NEdge *, HashPointer > &edgeSet, bool canJoinBoundaries=true) const |
Produces a maximal forest in the triangulation's 1-skeleton. | |
void | maximalForestInDualSkeleton (stdhash::hash_set< NFace *, HashPointer > &faceSet) const |
Produces a maximal forest in the triangulation's dual 1-skeleton. | |
bool | crushMaximalForest () |
Attempts to reduce the number of vertices by crushing a maximal forest in the 1-skeleton. | |
bool | intelligentSimplify () |
Attempts to simplify the triangulation as intelligently as possible without further input. | |
bool | simplifyToLocalMinimum (bool perform=true) |
Uses all known simplification moves to reduce the triangulation monotonically to some local minimum number of tetrahedra. | |
bool | threeTwoMove (NEdge *e, bool check=true, bool perform=true) |
Checks the eligibility of and/or performs a 3-2 move about the given edge. | |
bool | twoThreeMove (NFace *f, bool check=true, bool perform=true) |
Checks the eligibility of and/or performs a 2-3 move about the given face. | |
bool | fourFourMove (NEdge *e, int newAxis, bool check=true, bool perform=true) |
Checks the eligibility of and/or performs a 4-4 move about the given edge. | |
bool | twoZeroMove (NEdge *e, bool check=true, bool perform=true) |
Checks the eligibility of and/or performs a 2-0 move about the given edge of degree 2. | |
bool | twoZeroMove (NVertex *v, bool check=true, bool perform=true) |
Checks the eligibility of and/or performs a 2-0 move about the given vertex of degree 2. | |
bool | twoOneMove (NEdge *e, int edgeEnd, bool check=true, bool perform=true) |
Checks the eligibility of and/or performs a 2-1 move about the given edge. | |
bool | openBook (NFace *f, bool check=true, bool perform=true) |
Checks the eligibility of and/or performs a book opening move about the given face. | |
bool | shellBoundary (NTetrahedron *t, bool check=true, bool perform=true) |
Checks the eligibility of and/or performs a boundary shelling move on the given tetrahedron. | |
bool | collapseEdge (NEdge *e, bool check=true, bool perform=true) |
Checks the eligibility of and/or performs a collapse of an edge in such a way that the topology of the manifold does not change and the number of vertices of the triangulation decreases by one. | |
Decompositions | |
unsigned long | splitIntoComponents (NPacket *componentParent=0, bool setLabels=true) |
Splits a disconnected triangulation into many smaller triangulations, one for each component. | |
unsigned long | connectedSumDecomposition (NPacket *primeParent=0, bool setLabels=true) |
Splits this triangulation into its connected sum decomposition. | |
bool | isThreeSphere () const |
Determines whether this is a triangulation of a 3-sphere. | |
bool | knowsThreeSphere () const |
Is it already known (or trivial to determine) whether or not this is a triangulation of a 3-sphere? See isThreeSphere() for further details. | |
NPacket * | makeZeroEfficient () |
Converts this into a 0-efficient triangulation of the same underlying 3-manifold. | |
Subdivisions and Covers | |
void | makeDoubleCover () |
Converts this triangulation into its double cover. | |
bool | idealToFinite (bool forceDivision=false) |
Converts an ideal triangulation into a finite triangulation. | |
void | barycentricSubdivision () |
Does a barycentric subdivision of the triangulation. | |
Building Triangulations | |
NTetrahedron * | insertLayeredSolidTorus (unsigned long cuts0, unsigned long cuts1) |
Inserts a new layered solid torus into the triangulation. | |
void | insertLayeredLensSpace (unsigned long p, unsigned long q) |
Inserts a new layered lens space L(p,q) into the triangulation. | |
void | insertLayeredLoop (unsigned long length, bool twisted) |
Inserts a layered loop of the given length into this triangulation. | |
void | insertAugTriSolidTorus (long a1, long b1, long a2, long b2, long a3, long b3) |
Inserts an augmented triangular solid torus with the given parameters into this triangulation. | |
void | insertSFSOverSphere (long a1=1, long b1=0, long a2=1, long b2=0, long a3=1, long b3=0) |
Inserts an orientable Seifert fibred space with at most three exceptional fibres over the 2-sphere into this triangulation. | |
void | insertTriangulation (const NTriangulation &source) |
Inserts a copy of the given triangulation into this triangulation. | |
bool | insertRehydration (const std::string &dehydration) |
Inserts the rehydration of the given string into this triangulation. | |
Static Public Member Functions | |
static NTriangulation * | enterTextTriangulation (std::istream &in, std::ostream &out) |
Allows the user to interactively enter a triangulation in plain text. | |
static NXMLPacketReader * | getXMLReader (NPacket *parent) |
Returns a newly created XML element reader that will read the contents of a single XML packet element. | |
static NTriangulation * | readPacket (NFile &in, NPacket *parent) |
Reads a single packet from the specified file and returns a newly created object containing that information. | |
Static Public Attributes | |
static const int | packetType |
Contains the integer ID for this packet. | |
Protected Member Functions | |
virtual NPacket * | internalClonePacket (NPacket *parent) const |
Makes a newly allocated copy of this packet. | |
virtual void | writeXMLPacketData (std::ostream &out) const |
Writes a chunk of XML containing the data for this packet only. | |
void | cloneFrom (const NTriangulation &from) |
Turns this triangulation into a clone of the given triangulation. | |
Friends | |
class | regina::NXMLTriangulationReader |
When the triangulation is deleted, the corresponding tetrahedra, the cellular structure and all other properties will be deallocated.
Faces, edges, vertices and components are always temporary; whenever a change occurs with the triangulation, these will be deleted and a new skeletal structure will be calculated. The same is true of various other triangulation properties.
Whenever the gluings of tetrahedra have been altered, the routine responsible for changing the gluings must call NTriangulation::gluingsHaveChanged() to ensure that relevant properties will be recalculated when necessary. It is not necessary to call this function when adding or removing tetrahedra.
|
Used to iterate through boundary components.
|
|
Used to iterate through components.
|
|
Used to iterate through edges.
|
|
Used to iterate through faces.
|
|
Used to iterate through tetrahedra.
|
|
A map from (r, whichRoot) pairs to Turaev-Viro invariants.
|
|
Used to iterate through vertices.
|
|
Default constructor. Creates an empty triangulation. |
|
Copy constructor. Creates a new triangulation identical to the given triangulation. The packet tree structure and packet label are not copied.
|
|
Destroys this triangulation. The contained tetrahedra, the cellular structure and all other properties will also be deallocated. |
|
Inserts the given tetrahedron into the triangulation. No face gluings anywhere will be examined or altered. The new tetrahedron will be assigned a higher index in the triangulation than all tetrahedra already present. There is no need to call gluingsHaveChanged() after calling this function.
|
|
Returns the set of all Turaev-Viro state sum invariants that have already been calculated for this 3-manifold. Turaev-Viro invariants are described by an (r, whichRoot) pair as described in the turaevViro() notes. The set returned by this routine maps (r, whichRoot) pairs to the corresponding invariant values. Each time turaevViro() is called, the result will be stored in this set (as well as being returned to the user). This set will be emptied whenever the triangulation is modified.
|
|
Does a barycentric subdivision of the triangulation. Each tetrahedron is divided into 24 tetrahedra by placing an extra vertex at the centroid of each tetrahedron, the centroid of each face and the midpoint of each edge.
|
|
Turns this triangulation into a clone of the given triangulation. The tree structure and label of this triangulation are not touched.
|
|
Checks the eligibility of and/or performs a collapse of an edge in such a way that the topology of the manifold does not change and the number of vertices of the triangulation decreases by one. If the routine is asked to both check and perform, the move will only be performed if the check shows it is legal. Note that after performing this move, all skeletal objects (faces, components, etc.) will be invalid.
|
|
Splits this triangulation into its connected sum decomposition. The individual prime 3-manifold triangulations that make up this decomposition will be inserted as children of the given parent packet. The original triangulation will be left unchanged. Note that this routine is currently only available for closed orientable triangulations; see the list of preconditions for full details. The 0-efficiency prime decomposition algorithm of Jaco and Rubinstein is used. If the given parent packet is 0, the new prime summand triangulations will be inserted as children of this triangulation. This routine can optionally assign unique (and sensible) packet labels to each of the new prime summand triangulations. Note however that uniqueness testing may be slow, so this assignment of labels should be disabled if the summand triangulations are only temporary objects used as part of a larger routine. If this is a triangulation of a 3-sphere, no prime summand triangulations will be created at all.
|
|
Attempts to reduce the number of vertices by crushing a maximal forest in the 1-skeleton.
|
|
Determines if this packet depends upon its parent. This is true if the parent cannot be altered without invalidating or otherwise upsetting this packet.
Implements regina::NPacket. |
|
Allows the user to interactively enter a triangulation in plain text. Prompts will be sent to the given output stream and information will be read from the given input stream.
|
|
Checks the eligibility of and/or performs a 4-4 move about the given edge. This involves replacing the four tetrahedra joined at that edge with four tetrahedra joined along a different edge. Consider the octahedron made up of the four original tetrahedra; this has three internal axes. The initial four tetrahedra meet along the given edge which forms one of these axes; the new tetrahedra will meet along a different axis. This move can be done iff the edge is non-boundary and the four tetrahedra are distinct. If the routine is asked to both check and perform, the move will only be performed if the check shows it is legal. Note that after performing this move, all skeletal objects (faces, components, etc.) will be invalid.
|
|
Returns the requested triangulation boundary component. Bear in mind that each time the triangulation changes, the boundary components will be deleted and replaced with new ones. Thus this object should be considered temporary only.
|
|
Returns the index of the given boundary component in the triangulation.
|
|
Returns all boundary components of this triangulation. Note that each ideal vertex forms its own boundary component. Bear in mind that each time the triangulation changes, the boundary components will be deleted and replaced with new ones. Thus the objects contained in this list should be considered temporary only. This reference to the list however will remain valid and up-to-date for as long as the triangulation exists.
|
|
Returns the requested triangulation component. Bear in mind that each time the triangulation changes, the components will be deleted and replaced with new ones. Thus this object should be considered temporary only.
|
|
Returns the index of the given component in the triangulation.
|
|
Returns all components of this triangulation. Bear in mind that each time the triangulation changes, the components will be deleted and replaced with new ones. Thus the objects contained in this list should be considered temporary only. This reference to the list however will remain valid and up-to-date for as long as the triangulation exists.
|
|
Returns the requested triangulation edge. Bear in mind that each time the triangulation changes, the edges will be deleted and replaced with new ones. Thus this object should be considered temporary only.
|
|
Returns the index of the given edge in the triangulation.
|
|
Returns all edges of this triangulation. Bear in mind that each time the triangulation changes, the edges will be deleted and replaced with new ones. Thus the objects contained in this list should be considered temporary only. This reference to the list however will remain valid and up-to-date for as long as the triangulation exists.
|
|
Returns the Euler characteristic of this triangulation. This will be evaluated strictly as V-E+F-T. Thus if the manifold contains cusps, the Euler characteristic will almost certainly not be the same as the corresponding 3-manifold with the cusps truncated.
|
|
Returns the requested triangulation face. Bear in mind that each time the triangulation changes, the faces will be deleted and replaced with new ones. Thus this object should be considered temporary only.
|
|
Returns the index of the given face in the triangulation.
|
|
Returns all faces of this triangulation. Bear in mind that each time the triangulation changes, the faces will be deleted and replaced with new ones. Thus the objects contained in this list should be considered temporary only. This reference to the list however will remain valid and up-to-date for as long as the triangulation exists.
|
|
Returns the fundamental group of this triangulation. If this triangulation contains any ideal or non-standard vertices, the fundamental group will be calculated as if each such vertex had been truncated. If this triangulation contains any invalid edges, the calculations will be performed without any truncation of the corresponding projective plane cusp. Thus if a barycentric subdivision is performed on the triangulation, the result of getFundamentalGroup() will change. Bear in mind that each time the triangulation changes, the fundamental group will be deleted. Thus the group reference returned should not be kept for later use. Instead, getFundamentalGroup() should be called again; this will be instantaneous if the group has already been calculated. Note that this triangulation is not required to be valid (see isValid()).
|
|
Returns the first homology group for this triangulation. If this triangulation contains any ideal or non-standard vertices, the homology group will be calculated as if each such vertex had been truncated. If this triangulation contains any invalid edges, the calculations will be performed without any truncation of the corresponding projective plane cusp. Thus if a barycentric subdivision is performed on the triangulation, the result of getHomologyH1() will change. Bear in mind that each time the triangulation changes, the homology groups will be deleted. Thus the group reference returned should not be kept for later use. Instead, getHomologyH1() should be called again; this will be instantaneous if the group has already been calculated. Note that this triangulation is not required to be valid (see isValid()).
|
|
Returns the first homology group of the boundary for this triangulation. Note that ideal vertices are considered part of the boundary. Bear in mind that each time the triangulation changes, the homology groups will be deleted. Thus the group reference returned should not be kept for later use. Instead, getHomologyH1Bdry() should be called again; this will be instantaneous if the group has already been calculated. This routine is fairly fast, since it deduces the homology of each boundary component through knowing what kind of surface it is.
|
|
Returns the relative first homology group with respect to the boundary for this triangulation. Note that ideal vertices are considered part of the boundary. Bear in mind that each time the triangulation changes, the homology groups will be deleted. Thus the group reference returned should not be kept for later use. Instead, getHomologyH1Rel() should be called again; this will be instantaneous if the group has already been calculated.
|
|
Returns the second homology group for this triangulation. If this triangulation contains any ideal vertices, the homology group will be calculated as if each such vertex had been truncated. The algorithm used calculates various first homology groups and uses homology and cohomology theorems to deduce the second homology group. Bear in mind that each time the triangulation changes, the homology groups will be deleted. Thus the group reference returned should not be kept for later use. Instead, getHomologyH2() should be called again; this will be instantaneous if the group has already been calculated.
|
|
Returns the second homology group with coefficients in Z_2 for this triangulation. If this triangulation contains any ideal vertices, the homology group will be calculated as if each such vertex had been truncated. The algorithm used calculates the relative first homology group with respect to the boundary and uses homology and cohomology theorems to deduce the second homology group. This group will simply be the direct sum of several copies of Z_2, so the number of Z_2 terms is returned.
|
|
Returns the number of boundary components in this triangulation. Note that each ideal vertex forms its own boundary component.
|
|
Returns the number of components in this triangulation.
|
|
Returns the number of edges in this triangulation.
|
|
Returns the number of faces in this triangulation.
|
|
Returns the number of tetrahedra in the triangulation.
|
|
Returns the number of vertices in this triangulation.
|
|
Returns the integer ID representing this type of packet. This is the same for all packets of this class.
Implements regina::NPacket. |
|
Returns an English name for this type of packet.
An example is
Implements regina::NPacket. |
|
Returns all tetrahedra in the triangulation. The reference returned will remain valid for as long as the triangulation exists, always reflecting the tetrahedra currently in the triangulation.
|
|
Returns the tetrahedron with the given index number in the triangulation. Note that tetrahedron indexing may change when a tetrahedron is added or removed from the triangulation. This routine will ensure the skeleton is calculated, since other skeleton objects can be accessed from NTetrahedron.
|
|
Returns the tetrahedron with the given index number in the triangulation. Note that tetrahedron indexing may change when a tetrahedron is added or removed from the triangulation. This routine will ensure the skeleton is calculated, since other skeleton objects can be accessed from NTetrahedron.
|
|
Returns the index of the given tetrahedron in the triangulation. Note that tetrahedron indexing may change when a tetrahedron is added or removed from the triangulation.
|
|
Returns the requested triangulation vertex. Bear in mind that each time the triangulation changes, the vertices will be deleted and replaced with new ones. Thus this object should be considered temporary only.
|
|
Returns the index of the given vertex in the triangulation.
|
|
Returns all vertices of this triangulation. Bear in mind that each time the triangulation changes, the vertices will be deleted and replaced with new ones. Thus the objects contained in this list should be considered temporary only. This reference to the list however will remain valid and up-to-date for as long as the triangulation exists.
|
|
Returns a newly created XML element reader that will read the contents of a single XML packet element. You may assume that the packet to be read is of the same type as the class in which you are implementing this routine. The XML element reader should read exactly what writeXMLPacketData() writes, and vice versa. parent represents the packet which will become the new packet's parent in the tree structure, and may be assumed to have already been read from the file. This information is for reference only, and does not need to be used. The XML element reader can either insert or not insert the new packet beneath parent in the tree structure as it pleases. Note however that parent will be 0 if the new packet is to become a tree matriarch. This routine is not actually provided for NPacket itself, but must be declared and implemented for every packet subclass that will be instantiated.
Reimplemented from regina::NPacket. |
|
This must be called whenever the gluings of tetrahedra are changed! Clears appropriate properties and performs other necessary tasks. The responsibility of calling gluingsHaveChanged() falls upon the routine that alters the gluings (such as a component of a triangulation editor, or so on). |
|
Determines if this triangulation has any boundary faces.
|
|
Determines if this triangulation contains any ideal boundary components with negative Euler characteristic.
|
|
Determines whether this triangulation has a normal splitting surface. See NNormalSurface::isSplitting() for details regarding normal splitting surfaces.
|
|
Determines if this triangulation contains any two-sphere boundary components.
|
|
Converts an ideal triangulation into a finite triangulation. All ideal or non-standard vertices are truncated and thus converted into real boundary components made from unglued faces of tetrahedra.
|
|
Inserts an augmented triangular solid torus with the given parameters into this triangulation. Almost all augmented triangular solid tori represent Seifert fibred spaces with three or fewer exceptional fibres. Augmented triangular solid tori are described in more detail in the NAugTriSolidTorus class notes. The resulting Seifert fibred space will be SFS((a1,b1) (a2,b2) (a3,b3) (1,1)), where the parameters a1, ..., b3 are passed as arguments to this routine. The three layered solid tori that are attached to the central triangular solid torus will be LST(|a1|, |b1|, |-a1-b1|), ..., LST(|a3|, |b3|, |-a3-b3|). The new tetrahedra will be inserted at the end of the list of tetrahedra in the triangulation.
|
|
Inserts a new layered lens space L(p,q) into the triangulation. The lens space will be created by gluing together two layered solid tori in a way that uses the fewest possible tetrahedra. The new tetrahedra will be inserted at the end of the list of tetrahedra in the triangulation.
|
|
Inserts a layered loop of the given length into this triangulation. Layered loops are described in more detail in the NLayeredLoop class notes. The new tetrahedra will be inserted at the end of the list of tetrahedra in the triangulation.
|
|
Inserts a new layered solid torus into the triangulation. The meridinal disc of the layered solid torus will intersect the three edges of the boundary torus in cuts0, cuts1 and (cuts0 + cuts1) points respectively. The boundary torus will always consist of faces 012 and 013 of the tetrahedron containing this boundary torus (this tetrahedron will be returned). In face 012, edges 12, 02 and 01 will meet the meridinal disc cuts0, cuts1 and (cuts0 + cuts1) times respectively. The only exceptions are if these three intersection numbers are (1,1,2) or (0,1,1), in which case edges 12, 02 and 01 will meet the meridinal disc (1, 2 and 1) or (1, 1 and 0) times respectively. The new tetrahedra will be inserted at the end of the list of tetrahedra in the triangulation.
|
|
Inserts the rehydration of the given string into this triangulation. The given string will be rehydrated into a proper triangulation. The new tetrahedra will be inserted into this triangulation in the order in which they appear in the rehydrated triangulation, and the numbering of their vertices (0-3) will not change. For a full description of the dehydrated triangulation format, see A Census of Cusped Hyperbolic 3-Manifolds, Callahan, Hildebrand and Weeks, Mathematics of Computation 68/225, 1999.
|
|
Inserts an orientable Seifert fibred space with at most three exceptional fibres over the 2-sphere into this triangulation. The inserted Seifert fibred space will be SFS((a1,b1) (a2,b2) (a3,b3) (1,1)), where the parameters a1, ..., b3 are passed as arguments to this routine. The three pairs of parameters (a,b) do not need to be normalised, i.e., the parameters can be positive or negative and b may lie outside the range [0..a). There is no separate twisting parameter; each additional twist can be incorporated into the existing parameters by replacing some pair (a,b) with the pair (a,a+b). For Seifert fibred spaces with less than three exceptional fibres, some or all of the parameter pairs may be (1,k) or even (1,0). The new tetrahedra will be inserted at the end of the list of tetrahedra in the triangulation.
|
|
Inserts a copy of the given triangulation into this triangulation. The new tetrahedra will be inserted into this triangulation in the order in which they appear in the given triangulation, and the numbering of their vertices (0-3) will not change. They will be given the same descriptions as appear in the given triangulation.
|
|
Attempts to simplify the triangulation as intelligently as possible without further input. Currently this routine merely uses simplifyToLocalMinimum() in combination with random 4-4 moves.
|
|
Makes a newly allocated copy of this packet. This routine should not insert the new packet into the tree structure, clone the packet's associated tags or give the packet a label. It should also not clone any descendants of this packet. You may assume that the new packet will eventually be inserted into the tree beneath either the same parent as this packet or a clone of that parent.
Implements regina::NPacket. |
|
Determines if this triangulation is closed. This is the case if and only if it has no boundary. Note that ideal triangulations are not closed.
|
|
Determines if this triangulation is connected.
|
|
Determines if an isomorphic copy of this triangulation is contained within the given triangulation, possibly as a subcomplex of some larger component (or components). Specifically, this routine determines if there is a boundary incomplete combinatorial isomorphism from this triangulation to other. Boundary incomplete isomorphisms are described in detail in the NIsomorphism class notes. In particular, note that boundary faces of this triangulation need not correspond to boundary faces of other, and that other can contain more tetrahedra than this triangulation.
If a boundary incomplete isomorphism is found, the details of this isomorphism are returned. The isomorphism is newly constructed, and so to assist with memory management is returned as a std::auto_ptr. Thus, to test whether an isomorphism exists without having to explicitly deal with the isomorphism itself, you can call
|
|
Determines if this triangulation is ideal. This is the case if and only if one of the vertex links is closed and not a 2-sphere. Note that the triangulation is not required to be valid.
|
|
Determines if this triangulation is combinatorially isomorphic to the given triangulation. Specifically, this routine determines if there is a one-to-one and onto boundary complete combinatorial isomorphism from this triangulation to other. Boundary complete isomorphisms are described in detail in the NIsomorphism class notes. In particular, note that this triangulation and other must contain the same number of tetrahedra for such an isomorphism to exist.
if (isIsomorphicTo(other).get()) and the newly created isomorphism (if it exists) will be automatically destroyed.
|
|
Determines if this triangulation is orientable.
|
|
Determines if this triangulation is standard. This is the case if and only if every vertex is standard. See NVertex::isStandard() for further details.
|
|
Determines whether this is a triangulation of a 3-sphere. This routine relies upon a combination of Rubinstein's 3-sphere recognition algorithm and Jaco and Rubinstein's 0-efficiency prime decomposition algorithm.
|
|
Determines if this triangulation is valid.
A triangulation is valid unless there is some vertex whose link has boundary but is not a disc (i.e., a vertex for which NVertex::getLink() returns NVertex::NON_STANDARD_BDRY), or unless there is some edge glued to itself in reverse (i.e., an edge for which NEdge::isValid() returns
|
|
Determines if this triangulation is 0-efficient. A triangulation is 0-efficient if its only normal spheres and discs are vertex linking, and if it has no 2-sphere boundary components.
|
|
Is it already known whether or not this triangulation has a splitting surface? See hasSplittingSurface() for further details. If this property is already known, future calls to hasSplittingSurface() will be very fast (simply returning the precalculated value).
|
|
Is it already known (or trivial to determine) whether or not this is a triangulation of a 3-sphere? See isThreeSphere() for further details. If this property is indeed already known, future calls to isThreeSphere() will be very fast (simply returning the precalculated value).
If this property is not already known, this routine will nevertheless run some very fast preliminary tests to see if the answer is obviously no. If so, it will store
Otherwise a call to isThreeSphere() may potentially require more significant work, and so this routine will return
|
|
Is it already known whether or not this triangulation is 0-efficient? See isZeroEfficient() for further details. If this property is already known, future calls to isZeroEfficient() will be very fast (simply returning the precalculated value).
|
|
Converts this triangulation into its double cover. Each orientable component will be duplicated, and each non-orientable component will be converted into its orientable double cover. |
|
Converts this into a 0-efficient triangulation of the same underlying 3-manifold. A triangulation is 0-efficient if its only normal spheres and discs are vertex linking, and if it has no 2-sphere boundary components. Note that this routine is currently only available for closed orientable triangulations; see the list of preconditions for details. The 0-efficiency algorithm of Jaco and Rubinstein is used. If the underlying 3-manifold is prime, it can always be made 0-efficient (with the exception of the special cases RP3 and S2xS1 as noted below). In this case the original triangulation will be modified directly and 0 will be returned. If the underyling 3-manifold is RP3 or S2xS1, it cannot be made 0-efficient; in this case the original triangulation will be reduced to a two-tetrahedron minimal triangulation and 0 will again be returned. If the underlying 3-manifold is not prime, it cannot be made 0-efficient. In this case the original triangulation will remain unchanged and a new connected sum decomposition will be returned. This will be presented as a newly allocated container packet with one child triangulation for each prime summand.
|
|
Produces a maximal forest in the 1-skeleton of the triangulation boundary.
Both given sets will be emptied and the edges and vertices of the maximal forest will be placed into them. A vertex that forms its own boundary component (such as an ideal vertex) will still be placed in Note that the edge and vertex pointers returned will become invalid once the triangulation has changed.
|
|
Produces a maximal forest in the triangulation's dual 1-skeleton. The given set will be emptied and will have the faces corresponding to the edges of the maximal forest in the dual 1-skeleton placed into it. Note that the face pointers returned will become invalid once the triangulation has changed.
|
|
Produces a maximal forest in the triangulation's 1-skeleton. The given set will be emptied and will have the edges of the maximal forest placed into it. It can be specified whether or not different boundary components may be joined by the maximal forest. An edge leading to an ideal vertex is still a candidate for inclusion in the maximal forest. For the purposes of this algorithm, any ideal vertex will be treated as any other vertex (and will still be considered part of its own boundary component). Note that the edge pointers returned will become invalid once the triangulation has changed.
|
|
Checks the eligibility of and/or performs a book opening move about the given face. This involves taking a face meeting the boundary along two edges and ungluing it to create two new boundary faces and thus expose the tetrahedra it initially joined, allowing for potential boundary shelling moves. This move can be done only if the face meets the boundary in precisely two edges (and thus also joins two tetrahedra) and if the vertex between these two edges is a standard boundary vertex (its link is a disc). If the routine is asked to both check and perform, the move will only be performed if the check shows it is legal. Note that after performing this move, all skeletal objects (faces, components, etc.) will be invalid.
|
|
Reads an individual property from an old-style binary file. The property type and bookmarking details should not read; merely the contents of the property that are written to file between NFile::writePropertyHeader() and NFile::writePropertyFooter(). See the NFile::writePropertyHeader() notes for details. The property type of the property to be read will be passed in propType. If the property type is unrecognised, this routine should simply do nothing and return. If the property type is recognised, this routine should read the property and process it accordingly (e.g., store it in whatever data object is currently being read).
Implements regina::NFilePropertyReader. |
|
Reads a single packet from the specified file and returns a newly created object containing that information. You may assume that the packet to be read is of the same type as the class in which you are implementing this routine. The newly created object must also be of this type. For instance, NTriangulation::readPacket() may assume that the packet is of type NTriangulation, and must return a pointer to a newly created NTriangulation. Deallocation of the newly created packet is the responsibility of whoever calls this routine. The packet type and label may be assumed to have already been read from the file, and should not be reread. The readPacket() routine should read exactly what writePacket() writes, and vice versa. parent represents the packet which will become the new packet's parent in the tree structure, and may be assumed to have already been read from the file. This information is for reference only, and does not need to be used. This routine can either insert or not insert the new packet beneath parent in the tree structure as it pleases. Note however that parent will be 0 if the new packet is to become a tree matriarch. This routine is not actually provided for NPacket itself, but must be declared and implemented for every packet subclass that will be instantiated. Within each such subclass the function must be declared to return a pointer to an object of that subclass. For instance, NTriangulation::readPacket() must be declared to return an NTriangulation*, not simply an NPacket*. New packet types should make this routine simply return 0 since this file format is now obsolete, and older calculation engines will not understand newer packet types anyway.
Reimplemented from regina::NPacket. |
|
Removes all tetrahedra from the triangulation. All tetrahedra will be deallocated. There is no need to call gluingsHaveChanged() after calling this function. |
|
Removes the given tetrahedron from the triangulation. All faces glued to this tetrahedron will be unglued. The tetrahedron will not be deallocated. There is no need to call gluingsHaveChanged() after calling this function.
|
|
Removes the tetrahedron with the given index number from the triangulation. Note that tetrahedron indexing may change when a tetrahedron is added or removed from the triangulation. All faces glued to this tetrahedron will be unglued. The tetrahedron will not be deallocated. There is no need to call gluingsHaveChanged() after calling this function.
|
|
Checks the eligibility of and/or performs a boundary shelling move on the given tetrahedron. This involves simply popping off a tetrahedron that touches the boundary. This can be done only if precisely 1, 2 or 3 faces of the tetrahedron lie in the boundary. Furthermore, if 1 face lies in the boundary, the opposite vertex may not lie in the boundary. If 2 faces lie in the boundary, the remaining edge may not lie in the boundary and the remaining two faces of the tetrahedron may not be glued together. If the routine is asked to both check and perform, the move will only be performed if the check shows it is legal. Note that after performing this move, all skeletal objects (faces, components, etc.) will be invalid.
|
|
Notifies the triangulation that you have simplified the presentation of its fundamental group. The old group presentation will be destroyed, and this triangulation will take ownership of the new (hopefully simpler) group that is passed. This routine is useful for situations in which some external body (such as GAP) has simplified the group presentation better than Regina can. Regina does not verify that the new group presentation is equivalent to the old, since this is - well, hard. If the fundamental group has not yet been calculated for this triangulation, this routine will nevertheless take ownership of the new group, under the assumption that you have worked out the group through some other clever means without ever having needed to call getFundamentalGroup() at all. Note that this routine will not fire a packet change event.
|
|
Uses all known simplification moves to reduce the triangulation monotonically to some local minimum number of tetrahedra. Note that this will probably not give a globally minimal triangulation; see intelligentSimplify() for further assistance in achieving this goal. The moves used include 3-2, 2-0 (edge and vertex), 2-1 and boundary shelling moves. Note that book opening moves (which do not reduce the number of tetrahedra) are no longer used in this routine, in contrast with earlier releases of Regina.
|
|
Splits a disconnected triangulation into many smaller triangulations, one for each component. The new component triangulations will be inserted as children of the given parent packet. The original triangulation will be left unchanged. If the given parent packet is 0, the new component triangulations will be inserted as children of this triangulation. This routine can optionally assign unique (and sensible) packet labels to each of the new component triangulations. Note however that uniqueness testing may be slow, so this assignment of labels should be disabled if the component triangulations are only temporary objects used as part of a larger routine.
|
|
Checks the eligibility of and/or performs a 3-2 move about the given edge. This involves replacing the three tetrahedra joined at that edge with two tetrahedra joined by a face. This can be done iff the edge is non-boundary and the three tetrahedra are distinct. If the routine is asked to both check and perform, the move will only be performed if the check shows it is legal. Note that after performing this move, all skeletal objects (faces, components, etc.) will be invalid.
|
|
Computes the Turaev-Viro state sum invariant of this 3-manifold based upon the given initial data. The initial data is as described in the paper of Turaev and Viro, "State sum invariants of 3-manifolds and quantum 6j-symbols", Topology, vol. 31, no. 4, 1992, pp 865-902. In particular, Section 7 describes the initial data as determined by an integer r >=3 and a root of unity q0 of degree 2r for which q0^2 is a primitive root of unity of degree r. I believe that these invariants, although computed in the complex field, are all reals. However, I have not yet found a firm assertion of this and so in the meantime this routine simply returns the real portion and sends a warning to standard error if the imaginary portion is non-zero.
|
|
Checks the eligibility of and/or performs a 2-1 move about the given edge. This involves taking an edge meeting only one tetrahedron just once and merging that tetrahedron with one of the tetrahedra joining it.
This can be done assuming the following conditions. The edge must be non-boundary. The two vertices that are its endpoints cannot both be boundary. The two remaining faces of the tetrahedron may not be joined. Furthermore, consider the two edges of the second tetrahedron (to be merged) that run from the (identical) vertices of the original tetrahedron not touching If the routine is asked to both check and perform, the move will only be performed if the check shows it is legal. Note that after performing this move, all skeletal objects (faces, components, etc.) will be invalid.
|
|
Checks the eligibility of and/or performs a 2-3 move about the given face. This involves replacing the two tetrahedra joined at that face with three tetrahedra joined by an edge. This can be done iff the two tetrahedra are distinct. If the routine is asked to both check and perform, the move will only be performed if the check shows it is legal. Note that after performing this move, all skeletal objects (faces, components, etc.) will be invalid.
|
|
Checks the eligibility of and/or performs a 2-0 move about the given vertex of degree 2.
This involves taking the two tetrahedra joined at that vertex and squashing them flat. This can be done only if the vertex is non-boundary, the two tetrahedra are distinct, the faces opposite If the routine is asked to both check and perform, the move will only be performed if the check shows it is legal. Note that after performing this move, all skeletal objects (faces, components, etc.) will be invalid.
|
|
Checks the eligibility of and/or performs a 2-0 move about the given edge of degree 2.
This involves taking the two tetrahedra joined at that edge and squashing them flat. This can be done only if the edge is non-boundary, the two tetrahedra are distinct and the edges opposite If the routine is asked to both check and perform, the move will only be performed if the check shows it is legal. Note that after performing this move, all skeletal objects (faces, components, etc.) will be invalid.
|
|
Writes the packet details to the given old-style binary file. You may assume that the packet type and label have already been written. Only the actual data stored in the packet need be written. The default implementation for this routine does nothing; new packet types should not implement this routine since this file format is now obsolete, and older calculation engines will simply skip unknown packet types when reading from binary files.
Reimplemented from regina::NPacket. |
|
Writes this object in long text format to the given output stream. The output should provided the user with all the information they could want. The output should end with a newline. The default implementation of this routine merely calls writeTextShort() and adds a newline.
Reimplemented from regina::ShareableObject. |
|
Writes this object in short text format to the given output stream. The output should fit on a single line and no newline should be written.
Implements regina::ShareableObject. |
|
Writes a chunk of XML containing the data for this packet only. You may assume that the packet opening tag (including the packet type and label) has already been written, and that all child packets followed by the corresponding packet closing tag will be written immediately after this routine is called. This routine need only write the internal data stored in this specific packet.
Implements regina::NPacket. |
|
Contains the integer ID for this packet. Each distinct packet type must have a unique ID, and this should be a positive integer. See packetregistry.h for further requirements regarding ID selection. This member is not actually provided for NPacket itself, but must be declared for every packet subclass that will be instantiated. A value need not be assigned; packetregistry.h will take care of this task when you register the packet. Reimplemented from regina::NPacket. |