Regina Calculation Engine
|
Offers direct access to the SnapPea kernel from within Regina. More...
#include <snappea/nsnappeatriangulation.h>
Public Types | |
enum | SolutionType { not_attempted, geometric_solution, nongeometric_solution, flat_solution, degenerate_solution, other_solution, no_solution } |
Describes the different types of solution that can be found when solving for a hyperbolic structure. More... | |
typedef std::vector < NTetrahedron * > ::const_iterator | TetrahedronIterator |
Used to iterate through tetrahedra. More... | |
typedef std::vector< NTriangle * > ::const_iterator | TriangleIterator |
Used to iterate through triangles. More... | |
typedef std::vector< NTriangle * > ::const_iterator | FaceIterator |
A deprecated alias for TriangleIterator. More... | |
typedef std::vector< NEdge * > ::const_iterator | EdgeIterator |
Used to iterate through edges. More... | |
typedef std::vector< NVertex * > ::const_iterator | VertexIterator |
Used to iterate through vertices. More... | |
typedef std::vector < NComponent * > ::const_iterator | ComponentIterator |
Used to iterate through components. More... | |
typedef std::vector < NBoundaryComponent * > ::const_iterator | BoundaryComponentIterator |
Used to iterate through boundary components. More... | |
typedef std::map< std::pair < unsigned long, unsigned long > , double > | TuraevViroSet |
A map from (r, whichRoot) pairs to Turaev-Viro invariants. More... | |
typedef ChangeEventSpan | ChangeEventBlock |
A deprecated typedef for ChangeEventSpan. More... | |
typedef void | Triangulation |
The main data type for a dim-manifold triangulation. More... | |
typedef void | Simplex |
The data type for a top-dimensional simplex in a dim-manifold triangulation. More... | |
typedef void | Isomorphism |
The data type for an isomorphism between two dim-manifold triangulations. More... | |
typedef void | FacetPairing |
The data type that represents a pairing of facets of top-dimensional simplices in a dim-manifold triangulation. More... | |
typedef void | Perm |
The permutation type used to describe gluings between top-dimensional simplices in a dim-manifold triangulation. More... | |
Public Member Functions | |
template<> | |
unsigned long | getNumberOfFaces () const |
template<> | |
unsigned long | getNumberOfFaces () const |
template<> | |
unsigned long | getNumberOfFaces () const |
template<> | |
unsigned long | getNumberOfFaces () const |
Constructors and Destructors | |
NSnapPeaTriangulation () | |
Creates a null triangulation, with no internal SnapPea data at all. More... | |
NSnapPeaTriangulation (const std::string &fileNameOrContents) | |
Creates a new SnapPea triangulation from the contents of SnapPea data file. More... | |
NSnapPeaTriangulation (const NSnapPeaTriangulation &tri) | |
Creates a clone of the given SnapPea triangulation. More... | |
NSnapPeaTriangulation (const NTriangulation &tri, bool ignored=false) | |
Converts the given Regina triangulation to a SnapPea triangulation. More... | |
~NSnapPeaTriangulation () | |
Destroys this triangulation. More... | |
Basic Properties | |
bool | isNull () const |
Determines whether this triangulation contains valid SnapPea data. More... | |
std::string | name () const |
Returns SnapPea's internal name for this triangulation. More... | |
Hyperbolic Structures | |
SolutionType | solutionType () const |
Returns the type of solution found when solving for a hyperbolic structure, with respect to the current Dehn filling (if any). More... | |
double | volume () const |
Computes the volume of the current solution to the hyperbolic gluing equations. More... | |
double | volume (int &precision) const |
Computes the volume of the current solution to the hyperbolic gluing equations, and estimates the accuracy of the answer. More... | |
bool | volumeZero () const |
Determines whether the current solution to the gluing equations has volume approximately zero. More... | |
const std::complex< double > & | shape (unsigned tet) const |
Returns the shape of the given tetrahedron, with respect to the Dehn filled hyperbolic structure. More... | |
double | minImaginaryShape () const |
Returns the minimum imaginary part found amongst all tetrahedron shapes, with respect to the Dehn filled hyperbolic structure. More... | |
NMatrixInt * | gluingEquations () const |
Returns a matrix describing Thurston's gluing equations. More... | |
NMatrixInt * | gluingEquationsRect () const |
Returns a matrix describing Thurston's gluing equations in a streamlined form. More... | |
Cusps | |
unsigned | countCusps () const |
Returns the total number of cusps (both filled and complete). More... | |
unsigned | countCompleteCusps () const |
Returns the total number of complete cusps (that is, unfilled cusps). More... | |
unsigned | countFilledCusps () const |
Returns the total number of filled cusps. More... | |
const NCusp * | cusp (unsigned whichCusp=0) const |
Returns information about the given cusp of this manifold. More... | |
bool | fill (int m, int l, unsigned whichCusp=0) |
Assigns a Dehn filling to the given cusp. More... | |
void | unfill (unsigned whichCusp=0) |
Removes any filling on the given cusp. More... | |
NTriangulation * | filledTriangulation (unsigned whichCusp) const |
Retriangulates to permanently fill the given cusp. More... | |
NTriangulation * | filledTriangulation () const |
Retriangulates to permanently fill all non-complete cusps. More... | |
NMatrixInt * | slopeEquations () const |
Returns a matrix for computing boundary slopes of spun-normal surfaces at the cusps of the triangulation. More... | |
Algebraic Invariants | |
const NAbelianGroup * | homologyFilled () const |
Returns the first homology group of the manifold with respect to the current Dehn filling (if any). More... | |
const NGroupPresentation * | fundamentalGroupFilled (bool simplifyPresentation=true, bool fillingsMayAffectGenerators=true, bool minimiseNumberOfGenerators=true) const |
Returns the fundamental group of the manifold with respect to the current Dehn filling (if any). More... | |
Manipulating SnapPea triangulations | |
NSnapPeaTriangulation * | protoCanonize () const |
Constructs the canonical cell decomposition, using an arbitrary retriangulation if this decomposition contains non-tetrahedron cells. More... | |
NSnapPeaTriangulation * | protoCanonise () const |
A synonym for protoCanonize(), which constructs the canonical cell decomposition using an arbitrary retriangulation if necessary. More... | |
NTriangulation * | canonize () const |
Constructs the canonical retriangulation of the canonical cell decomposition. More... | |
NTriangulation * | canonise () const |
A synonym for canonize(), which constructs the canonical retriangulation of the canonical cell decomposition. More... | |
void | randomize () |
Asks SnapPea to randomly retriangulate this manifold, using local moves that preserve the topology. More... | |
void | randomise () |
A synonym for randomize(), which asks SnapPea to randomly retriangulate this manifold. More... | |
Deprecated routines | |
bool | verifyTriangulation (const NTriangulation &triangulation) const |
Deprecated routine that verifies whether the tetrahedron face gluings from this SnapPea triangulation match the given Regina triangulation precisely. More... | |
NTriangulation * | toRegina () const |
Deprecated routine to create a new Regina triangulation that mirrors the internal SnapPea structure. More... | |
void | dump () const |
Deprecated routine that dumps the full internal SnapPea data to standard output, using SnapPea's file format. More... | |
void | saveAsSnapPea (const char *filename) const |
Deprecated routine that saves the underlying triangulation as a native SnapPea data file. More... | |
SnapPea Input and Output | |
virtual std::string | snapPea () const |
Returns a string containing the full contents of a SnapPea data file that describes this triangulation. More... | |
virtual void | snapPea (std::ostream &out) const |
Writes the full contents of a SnapPea data file describing this triangulation to the given output stream. More... | |
virtual bool | saveSnapPea (const char *filename) const |
Writes this triangulation to the given file using SnapPea's native file format. More... | |
Packet Listener Interface | |
virtual void | packetWasChanged (NPacket *packet) |
Called after the contents of the packet have been changed. More... | |
Tetrahedra | |
unsigned long | getNumberOfTetrahedra () const |
Returns the number of tetrahedra in the triangulation. More... | |
unsigned long | getNumberOfSimplices () const |
A dimension-agnostic alias for getNumberOfTetrahedra(). More... | |
const std::vector < NTetrahedron * > & | getTetrahedra () const |
Returns all tetrahedra in the triangulation. More... | |
const std::vector < NTetrahedron * > & | getSimplices () const |
A dimension-agnostic alias for getTetrahedra(). More... | |
NTetrahedron * | getTetrahedron (unsigned long index) |
Returns the tetrahedron with the given index number in the triangulation. More... | |
const NTetrahedron * | getTetrahedron (unsigned long index) const |
Returns the tetrahedron with the given index number in the triangulation. More... | |
NTetrahedron * | getSimplex (unsigned long index) |
A dimension-agnostic alias for getTetrahedron(). More... | |
const NTetrahedron * | getSimplex (unsigned long index) const |
A dimension-agnostic alias for getTetrahedron(). More... | |
long | tetrahedronIndex (const NTetrahedron *tet) const |
Returns the index of the given tetrahedron in the triangulation. More... | |
long | simplexIndex (const NTetrahedron *tet) const |
A dimension-agnostic alias for tetrahedronIndex(). More... | |
NTetrahedron * | newTetrahedron () |
Creates a new tetrahedron and adds it to this triangulation. More... | |
NTetrahedron * | newTetrahedron (const std::string &desc) |
Creates a new tetrahedron with the given description and adds it to this triangulation. More... | |
NTetrahedron * | newSimplex () |
A dimension-agnostic alias for newTetrahedron(). More... | |
NTetrahedron * | newSimplex (const std::string &desc) |
A dimension-agnostic alias for newTetrahedron(). More... | |
void | addTetrahedron (NTetrahedron *tet) |
Inserts the given tetrahedron into the triangulation. More... | |
void | removeTetrahedron (NTetrahedron *tet) |
Removes the given tetrahedron from the triangulation. More... | |
void | removeSimplex (NTetrahedron *tet) |
A dimension-agnostic alias for removeTetrahedron(). More... | |
void | removeTetrahedronAt (unsigned long index) |
Removes the tetrahedron with the given index number from the triangulation. More... | |
void | removeSimplexAt (unsigned long index) |
A dimension-agnostic alias for removeTetrahedronAt(). More... | |
void | removeAllTetrahedra () |
Removes all tetrahedra from the triangulation. More... | |
void | removeAllSimplices () |
A dimension-agnostic alias for removeAllTetrahedra(). More... | |
void | swapContents (NTriangulation &other) |
Swaps the contents of this and the given triangulation. More... | |
void | moveContentsTo (NTriangulation &dest) |
Moves the contents of this triangulation into the given destination triangulation, without destroying any pre-existing contents. More... | |
void | gluingsHaveChanged () |
This routine now does nothing, and should not be used. More... | |
Skeletal Queries | |
unsigned long | getNumberOfBoundaryComponents () const |
Returns the number of boundary components in this triangulation. More... | |
unsigned long | getNumberOfComponents () const |
Returns the number of components in this triangulation. More... | |
unsigned long | getNumberOfVertices () const |
Returns the number of vertices in this triangulation. More... | |
unsigned long | getNumberOfEdges () const |
Returns the number of edges in this triangulation. More... | |
unsigned long | getNumberOfTriangles () const |
Returns the number of triangular faces in this triangulation. More... | |
unsigned long | getNumberOfFaces () const |
A deprecated alias for getNumberOfTriangles(). More... | |
template<int dim> | |
unsigned long | getNumberOfFaces () const |
Returns the number of faces of the given dimension in this triangulation. More... | |
const std::vector< NComponent * > & | getComponents () const |
Returns all components of this triangulation. More... | |
const std::vector < NBoundaryComponent * > & | getBoundaryComponents () const |
Returns all boundary components of this triangulation. More... | |
const std::vector< NVertex * > & | getVertices () const |
Returns all vertices of this triangulation. More... | |
const std::vector< NEdge * > & | getEdges () const |
Returns all edges of this triangulation. More... | |
const std::vector< NTriangle * > & | getTriangles () const |
Returns all triangular faces of this triangulation. More... | |
const std::vector< NTriangle * > & | getFaces () const |
A deprecated alias for getTriangles(). More... | |
NComponent * | getComponent (unsigned long index) const |
Returns the requested triangulation component. More... | |
NBoundaryComponent * | getBoundaryComponent (unsigned long index) const |
Returns the requested triangulation boundary component. More... | |
NVertex * | getVertex (unsigned long index) const |
Returns the requested vertex in this triangulation. More... | |
NEdge * | getEdge (unsigned long index) const |
Returns the requested edge in this triangulation. More... | |
NTriangle * | getTriangle (unsigned long index) const |
Returns the requested triangular face in this triangulation. More... | |
NTriangle * | getFace (unsigned long index) const |
A deprecated alias for getTriangle(). More... | |
long | componentIndex (const NComponent *component) const |
Returns the index of the given component in the triangulation. More... | |
long | boundaryComponentIndex (const NBoundaryComponent *bc) const |
Returns the index of the given boundary component in the triangulation. More... | |
long | vertexIndex (const NVertex *vertex) const |
Returns the index of the given vertex in the triangulation. More... | |
long | edgeIndex (const NEdge *edge) const |
Returns the index of the given edge in the triangulation. More... | |
long | triangleIndex (const NTriangle *triangle) const |
Returns the index of the given triangle in the triangulation. More... | |
long | faceIndex (const NTriangle *triangle) const |
A deprecated alias for triangleIndex(). More... | |
bool | hasTwoSphereBoundaryComponents () const |
Determines if this triangulation contains any two-sphere boundary components. More... | |
bool | hasNegativeIdealBoundaryComponents () const |
Determines if this triangulation contains any ideal boundary components with negative Euler characteristic. More... | |
Basic Properties | |
long | getEulerCharTri () const |
Returns the Euler characteristic of this triangulation. More... | |
long | getEulerCharManifold () const |
Returns the Euler characteristic of the corresponding compact 3-manifold. More... | |
long | getEulerCharacteristic () const |
A deprecated alias for getEulerCharTri(). More... | |
bool | isValid () const |
Determines if this triangulation is valid. More... | |
bool | isIdeal () const |
Determines if this triangulation is ideal. More... | |
bool | isStandard () const |
Determines if this triangulation is standard. More... | |
bool | hasBoundaryTriangles () const |
Determines if this triangulation has any boundary triangles. More... | |
bool | hasBoundaryFaces () const |
A deprecated alias for hasBoundaryTriangles(). More... | |
unsigned long | getNumberOfBoundaryTriangles () const |
Returns the number of boundary triangles in this triangulation. More... | |
bool | isClosed () const |
Determines if this triangulation is closed. More... | |
bool | isOrientable () const |
Determines if this triangulation is orientable. More... | |
bool | isOriented () const |
Determines if this triangulation is oriented; that is, if tetrahedron vertices are labelled in a way that preserves orientation across adjacent tetrahedron faces. More... | |
bool | isOrdered () const |
Determines if this triangulation is ordered; that is, if tetrahedron vertices are labelled so that all gluing permutations are order-preserving on the tetrahedron faces. More... | |
bool | isConnected () const |
Determines if this triangulation is connected. More... | |
Algebraic Properties | |
const NGroupPresentation & | getFundamentalGroup () const |
Returns the fundamental group of this triangulation. More... | |
void | simplifiedFundamentalGroup (NGroupPresentation *newGroup) |
Notifies the triangulation that you have simplified the presentation of its fundamental group. More... | |
const NAbelianGroup & | getHomologyH1 () const |
Returns the first homology group for this triangulation. More... | |
const NAbelianGroup & | getHomologyH1Rel () const |
Returns the relative first homology group with respect to the boundary for this triangulation. More... | |
const NAbelianGroup & | getHomologyH1Bdry () const |
Returns the first homology group of the boundary for this triangulation. More... | |
const NAbelianGroup & | getHomologyH2 () const |
Returns the second homology group for this triangulation. More... | |
unsigned long | getHomologyH2Z2 () const |
Returns the second homology group with coefficients in Z_2 for this triangulation. More... | |
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. More... | |
const TuraevViroSet & | allCalculatedTuraevViro () const |
Returns the set of all Turaev-Viro state sum invariants that have already been calculated for this 3-manifold. More... | |
Normal Surfaces and Angle Structures | |
bool | isZeroEfficient () |
Determines if this triangulation is 0-efficient. More... | |
bool | knowsZeroEfficient () const |
Is it already known whether or not this triangulation is 0-efficient? See isZeroEfficient() for further details. More... | |
bool | hasSplittingSurface () |
Determines whether this triangulation has a normal splitting surface. More... | |
bool | knowsSplittingSurface () const |
Is it already known whether or not this triangulation has a splitting surface? See hasSplittingSurface() for further details. More... | |
NNormalSurface * | hasNonTrivialSphereOrDisc () |
Searches for a non-vertex-linking normal sphere or disc within this triangulation. More... | |
NNormalSurface * | hasOctagonalAlmostNormalSphere () |
Searches for an octagonal almost normal 2-sphere within this triangulation. More... | |
const NAngleStructure * | findStrictAngleStructure () const |
Searches for a strict angle structure on this triangulation. More... | |
bool | hasStrictAngleStructure () const |
Determines whether this triangulation supports a strict angle structure. More... | |
bool | knowsStrictAngleStructure () const |
Is it already known (or trivial to determine) whether or not this triangulation supports a strict angle structure? See hasStrictAngleStructure() for further details. More... | |
Skeletal Transformations | |
void | maximalForestInBoundary (std::set< NEdge * > &edgeSet, std::set< NVertex * > &vertexSet) const |
Produces a maximal forest in the 1-skeleton of the triangulation boundary. More... | |
void | maximalForestInSkeleton (std::set< NEdge * > &edgeSet, bool canJoinBoundaries=true) const |
Produces a maximal forest in the triangulation's 1-skeleton. More... | |
void | maximalForestInDualSkeleton (std::set< NTriangle * > &triangleSet) const |
Produces a maximal forest in the triangulation's dual 1-skeleton. More... | |
bool | intelligentSimplify () |
Attempts to simplify the triangulation as intelligently as possible without further input. More... | |
bool | simplifyToLocalMinimum (bool perform=true) |
Uses all known simplification moves to reduce the triangulation monotonically to some local minimum number of tetrahedra. More... | |
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. More... | |
bool | twoThreeMove (NTriangle *t, bool check=true, bool perform=true) |
Checks the eligibility of and/or performs a 2-3 move about the given triangle. More... | |
bool | oneFourMove (NTetrahedron *t, bool check=true, bool perform=true) |
Checks the eligibility of and/or performs a 1-4 move upon the given tetrahedron. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
bool | openBook (NTriangle *t, bool check=true, bool perform=true) |
Checks the eligibility of and/or performs a book opening move about the given triangle. More... | |
bool | closeBook (NEdge *e, bool check=true, bool perform=true) |
Checks the eligibility of and/or performs a book closing move about the given boundary edge. More... | |
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. More... | |
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. More... | |
void | reorderTetrahedraBFS (bool reverse=false) |
Reorders the tetrahedra of this triangulation using a breadth-first search, so that small-numbered tetrahedra are adjacent to other small-numbered tetrahedra. More... | |
void | orient () |
Relabels tetrahedron vertices in this triangulation so that all tetrahedra are oriented consistently, if possible. More... | |
bool | order (bool forceOriented=false) |
Relabels tetrahedron vertices in this triangulation to give an ordered triangulation, if possible. More... | |
Decompositions | |
unsigned long | splitIntoComponents (NPacket *componentParent=0, bool setLabels=true) |
Splits a disconnected triangulation into many smaller triangulations, one for each component. More... | |
long | connectedSumDecomposition (NPacket *primeParent=0, bool setLabels=true) |
Splits this triangulation into its connected sum decomposition. More... | |
bool | isThreeSphere () const |
Determines whether this is a triangulation of a 3-sphere. More... | |
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. More... | |
bool | isBall () const |
Determines whether this is a triangulation of a 3-dimensional ball. More... | |
bool | knowsBall () const |
Is it already known (or trivial to determine) whether or not this is a triangulation of a 3-dimensional ball? See isBall() for further details. More... | |
NPacket * | makeZeroEfficient () |
Converts this into a 0-efficient triangulation of the same underlying 3-manifold. More... | |
bool | isSolidTorus () const |
Determines whether this is a triangulation of the solid torus; that is, the unknot complement. More... | |
bool | knowsSolidTorus () const |
Is it already known (or trivial to determine) whether or not this is a triangulation of a solid torus (that is, the unknot complement)? See isSolidTorus() for further details. More... | |
bool | isIrreducible () const |
Determines whether the underlying 3-manifold (which must be closed) is irreducible. More... | |
bool | knowsIrreducible () const |
Is it already known (or trivial to determine) whether or not the underlying 3-manifold is irreducible? See isIrreducible() for further details. More... | |
bool | hasCompressingDisc () const |
Searches for a compressing disc within the underlying 3-manifold. More... | |
bool | knowsCompressingDisc () const |
Is it already known (or trivial to determine) whether or not the underlying 3-manifold contains a compressing disc? See hasCompressingDisc() for further details. More... | |
bool | isHaken () const |
Determines whether the underlying 3-manifold (which must be closed and orientable) is Haken. More... | |
bool | knowsHaken () const |
Is it already known (or trivial to determine) whether or not the underlying 3-manifold is Haken? See isHaken() for further details. More... | |
bool | hasSimpleCompressingDisc () const |
Searches for a "simple" compressing disc inside this triangulation. More... | |
Subdivisions, Extensions and Covers | |
void | makeDoubleCover () |
Converts this triangulation into its double cover. More... | |
bool | idealToFinite (bool forceDivision=false) |
Converts an ideal triangulation into a finite triangulation. More... | |
bool | finiteToIdeal () |
Converts each real boundary component into a cusp (i.e., an ideal vertex). More... | |
void | barycentricSubdivision () |
Does a barycentric subdivision of the triangulation. More... | |
void | drillEdge (NEdge *e) |
Drills out a regular neighbourhood of the given edge of the triangulation. More... | |
void | puncture (NTetrahedron *tet=0) |
Punctures this manifold by removing a 3-ball from the interior of the given tetrahedron. More... | |
Building Triangulations | |
NTetrahedron * | layerOn (NEdge *edge) |
Performs a layering upon the given boundary edge of the triangulation. More... | |
NTetrahedron * | insertLayeredSolidTorus (unsigned long cuts0, unsigned long cuts1) |
Inserts a new layered solid torus into the triangulation. More... | |
void | insertLayeredLensSpace (unsigned long p, unsigned long q) |
Inserts a new layered lens space L(p,q) into the triangulation. More... | |
void | insertLayeredLoop (unsigned long length, bool twisted) |
Inserts a layered loop of the given length into this triangulation. More... | |
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. More... | |
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. More... | |
void | connectedSumWith (const NTriangulation &other) |
Forms the connected sum of this triangulation with the given triangulation. More... | |
void | insertTriangulation (const NTriangulation &source) |
Inserts a copy of the given triangulation into this triangulation. More... | |
bool | insertRehydration (const std::string &dehydration) |
Inserts the rehydration of the given string into this triangulation. More... | |
void | insertConstruction (unsigned long nTetrahedra, const int adjacencies[][4], const int gluings[][4][4]) |
Inserts into this triangulation a set of tetrahedra and their gluings as described by the given integer arrays. More... | |
Exporting Triangulations | |
std::string | dehydrate () const |
Dehydrates this triangulation into an alphabetical string. More... | |
std::string | dumpConstruction () const |
Returns C++ code that can be used with insertConstruction() to reconstruct this triangulation. More... | |
std::string | recogniser () const |
Returns a string that expresses this triangulation in Matveev's 3-manifold recogniser format. More... | |
void | recogniser (std::ostream &out) const |
Writes a string expressing this triangulation in Matveev's 3-manifold recogniser format to the given output stream. More... | |
std::string | recognizer () const |
A synonym for recogniser(). More... | |
void | recognizer (std::ostream &out) const |
A synonym for recognizer(std::ostream&). More... | |
bool | saveRecogniser (const char *filename) const |
Writes this triangulation to the given file in Matveev's 3-manifold recogniser format. More... | |
bool | saveRecognizer (const char *filename) const |
A synonym for saveRecogniser(). More... | |
Packet Identification | |
virtual PacketType | getPacketType () const =0 |
Returns the unique integer ID representing this type of packet. More... | |
virtual std::string | getPacketTypeName () const =0 |
Returns an English name for this type of packet. More... | |
const std::string & | getPacketLabel () const |
Returns the label associated with this individual packet. More... | |
std::string | getHumanLabel () const |
Returns the label associated with this individual packet, adjusted if necessary for human-readable output. More... | |
void | setPacketLabel (const std::string &newLabel) |
Sets the label associated with this individual packet. More... | |
std::string | getFullName () const |
Returns a descriptive text string for the packet. More... | |
std::string | makeUniqueLabel (const std::string &base) const |
Returns a new label that cannot be found anywhere in the entire tree structure. More... | |
bool | makeUniqueLabels (NPacket *reference) |
Ensures that all packet labels in both this and the given packet tree combined are distinct. More... | |
Tags | |
bool | hasTag (const std::string &tag) const |
Determines whether this packet has the given associated tag. More... | |
bool | hasTags () const |
Determines whether this packet has any associated tags at all. More... | |
bool | addTag (const std::string &tag) |
Associates the given tag with this packet. More... | |
bool | removeTag (const std::string &tag) |
Removes the association of the given tag with this packet. More... | |
void | removeAllTags () |
Removes all associated tags from this packet. More... | |
const std::set< std::string > & | getTags () const |
Returns the set of all tags associated with this packet. More... | |
Event Handling | |
bool | listen (NPacketListener *listener) |
Registers the given packet listener to listen for events on this packet. More... | |
bool | isListening (NPacketListener *listener) |
Determines whether the given packet listener is currently listening for events on this packet. More... | |
bool | unlisten (NPacketListener *listener) |
Unregisters the given packet listener so that it no longer listens for events on this packet. More... | |
Tree Queries | |
NPacket * | getTreeParent () const |
Determines the parent packet in the tree structure. More... | |
NPacket * | getFirstTreeChild () const |
Determines the first child of this packet in the tree structure. More... | |
NPacket * | getLastTreeChild () const |
Determines the last child of this packet in the tree structure. More... | |
NPacket * | getNextTreeSibling () const |
Determines the next sibling of this packet in the tree structure. More... | |
NPacket * | getPrevTreeSibling () const |
Determines the previous sibling of this packet in the tree structure. More... | |
NPacket * | getTreeMatriarch () const |
Determines the matriarch (the root) of the tree to which this packet belongs. More... | |
unsigned | levelsDownTo (const NPacket *descendant) const |
Counts the number of levels between this packet and its given descendant in the tree structure. More... | |
unsigned | levelsUpTo (const NPacket *ancestor) const |
Counts the number of levels between this packet and its given ancestor in the tree structure. More... | |
bool | isGrandparentOf (const NPacket *descendant) const |
Determines if this packet is equal to or an ancestor of the given packet in the tree structure. More... | |
unsigned long | getNumberOfChildren () const |
Returns the number of immediate children of this packet. More... | |
unsigned long | getNumberOfDescendants () const |
Returns the total number of descendants of this packet. More... | |
unsigned long | getTotalTreeSize () const |
Determines the total number of packets in the tree or subtree for which this packet is matriarch. More... | |
Tree Manipulation | |
void | insertChildFirst (NPacket *child) |
Inserts the given packet as the first child of this packet. More... | |
void | insertChildLast (NPacket *child) |
Inserts the given packet as the last child of this packet. More... | |
void | insertChildAfter (NPacket *newChild, NPacket *prevChild) |
Inserts the given packet as a child of this packet at the given location in this packet's child list. More... | |
void | makeOrphan () |
Cuts this packet away from its parent in the tree structure and instead makes it matriarch of its own tree. More... | |
void | reparent (NPacket *newParent, bool first=false) |
Cuts this packet away from its parent in the tree structure, and inserts it as a child of the given packet instead. More... | |
void | swapWithNextSibling () |
Swaps this packet with its next sibling in the sequence of children beneath their common parent packet. More... | |
void | moveUp (unsigned steps=1) |
Moves this packet the given number of steps towards the beginning of its sibling list. More... | |
void | moveDown (unsigned steps=1) |
Moves this packet the given number of steps towards the end of its sibling list. More... | |
void | moveToFirst () |
Moves this packet to be the first in its sibling list. More... | |
void | moveToLast () |
Moves this packet to be the last in its sibling list. More... | |
void | sortChildren () |
Sorts the immediate children of this packet according to their packet labels. More... | |
Searching and Iterating | |
NPacket * | nextTreePacket () |
Finds the next packet after this in a complete depth-first iteration of the entire tree structure to which this packet belongs. More... | |
const NPacket * | nextTreePacket () const |
Finds the next packet after this in a complete depth-first iteration of the entire tree structure to which this packet belongs. More... | |
NPacket * | nextTreePacket (const std::string &type) |
Finds the next packet after this of the requested type in a complete depth-first iteration of the entire tree structure. More... | |
const NPacket * | nextTreePacket (const std::string &type) const |
Finds the next packet after this of the requested type in a complete depth-first iteration of the entire tree structure. More... | |
NPacket * | firstTreePacket (const std::string &type) |
Finds the first packet of the requested type in a complete depth-first iteration of the tree structure. More... | |
const NPacket * | firstTreePacket (const std::string &type) const |
Finds the first packet of the requested type in a complete depth-first iteration of the tree structure. More... | |
NPacket * | findPacketLabel (const std::string &label) |
Finds the packet with the requested label in the tree or subtree for which this packet is matriarch. More... | |
const NPacket * | findPacketLabel (const std::string &label) const |
Finds the packet with the requested label in the tree or subtree for which this packet is matriarch. More... | |
Packet Dependencies | |
bool | isPacketEditable () const |
Determines whether this packet can be altered without invalidating or otherwise upsetting any of its immediate children. More... | |
Cloning | |
NPacket * | clone (bool cloneDescendants=false, bool end=true) const |
Clones this packet (and possibly its descendants), assigns to it a suitable unused label and inserts the clone into the tree as a sibling of this packet. More... | |
File I/O | |
bool | save (const char *filename, bool compressed=true) const |
Saves the subtree rooted at this packet to the given Regina data file, using Regina's native XML file format. More... | |
void | writeXMLFile (std::ostream &out) const |
Writes the subtree rooted at this packet to the given output stream in Regina's native XML file format. More... | |
std::string | internalID () const |
Returns a unique string ID that identifies this packet. More... | |
Input and Output | |
std::string | str () const |
Returns the output from writeTextShort() as a string. More... | |
std::string | toString () const |
A deprecated alias for str(), which returns the output from writeTextShort() as a string. More... | |
std::string | detail () const |
Returns the output from writeTextLong() as a string. More... | |
std::string | toStringLong () const |
A deprecated alias for detail(), which returns the output from writeTextLong() as a string. More... | |
Basic Properties | |
bool | isEmpty () const |
Determines whether this triangulation is empty. More... | |
Isomorphism Testing | |
bool | isIdenticalTo (const typename DimTraits< dim >::Triangulation &other) const |
Determines if this triangulation is combinatorially identical to the given triangulation. More... | |
std::auto_ptr< typename DimTraits< dim >::Isomorphism > | isIsomorphicTo (const typename DimTraits< dim >::Triangulation &other) const |
Determines if this triangulation is combinatorially isomorphic to the given triangulation. More... | |
std::auto_ptr< typename DimTraits< dim >::Isomorphism > | isContainedIn (const typename DimTraits< dim >::Triangulation &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). More... | |
unsigned long | findAllIsomorphisms (const typename DimTraits< dim >::Triangulation &other, std::list< typename DimTraits< dim >::Isomorphism * > &results) const |
Finds all ways in which this triangulation is combinatorially isomorphic to the given triangulation. More... | |
unsigned long | findAllSubcomplexesIn (const typename DimTraits< dim >::Triangulation &other, std::list< typename DimTraits< dim >::Isomorphism * > &results) const |
Finds all ways in which an isomorphic copy of this triangulation is contained within the given triangulation, possibly as a subcomplex of some larger component (or components). More... | |
bool | makeCanonical () |
Relabel the top-dimensional simplices and their vertices so that this triangulation is in canonical form. More... | |
Exporting Triangulations | |
std::string | isoSig (typename DimTraits< dim >::Isomorphism **relabelling=0) const |
Constructs the isomorphism signature for this triangulation. More... | |
Packet Listener Interface | |
void | unregisterFromAllPackets () |
Unregisters this listener from any packets to which it is currently listening. More... | |
virtual void | packetToBeChanged (NPacket *packet) |
Called before the contents of the packet are to be changed. More... | |
virtual void | packetToBeRenamed (NPacket *packet) |
Called before the packet label or tags are to be changed. More... | |
virtual void | packetWasRenamed (NPacket *packet) |
Called after the packet label or tags have been changed. More... | |
virtual void | packetToBeDestroyed (NPacket *packet) |
Called before the packet is about to be destroyed. More... | |
virtual void | childToBeAdded (NPacket *packet, NPacket *child) |
Called before a child packet is to be inserted directly beneath the packet. More... | |
virtual void | childWasAdded (NPacket *packet, NPacket *child) |
Called after a child packet has been inserted directly beneath the packet. More... | |
virtual void | childToBeRemoved (NPacket *packet, NPacket *child, bool inParentDestructor) |
Called before a child packet is to be removed from directly beneath the packet. More... | |
virtual void | childWasRemoved (NPacket *packet, NPacket *child, bool inParentDestructor) |
Called after a child packet has been removed from directly beneath the packet. More... | |
virtual void | childrenToBeReordered (NPacket *packet) |
Called before the child packets directly beneath the packet are to be reordered. More... | |
virtual void | childrenWereReordered (NPacket *packet) |
Called after the child packets directly beneath the packet have been reordered. More... | |
Static Public Member Functions | |
SnapPea kernel messages | |
static bool | kernelMessagesEnabled () |
Returns whether or not the SnapPea kernel writes diagnostic messages to standard output. More... | |
static void | enableKernelMessages (bool enabled=true) |
Configures whether or not the SnapPea kernel should write diagnostic messages to standard output. More... | |
static void | disableKernelMessages () |
Specifies that the SnapPea kernel should not write diagnostic messages to standard output. More... | |
Importing Triangulations | |
static NTriangulation * | enterTextTriangulation (std::istream &in, std::ostream &out) |
Allows the user to interactively enter a triangulation in plain text. More... | |
static NTriangulation * | rehydrate (const std::string &dehydration) |
Rehydrates the given alphabetical string into a new triangulation. More... | |
static NTriangulation * | fromSnapPea (const std::string &snapPeaData) |
Extracts the tetrahedron gluings from a string that contains the full contents of a SnapPea data file. More... | |
Importing Triangulations | |
static DimTraits< dim > ::Triangulation * | fromIsoSig (const std::string &sig) |
Recovers a full triangulation from an isomorphism signature. More... | |
static size_t | isoSigComponentSize (const std::string &sig) |
Deduces the number of top-dimensional simplices in a connected triangulation from its isomorphism signature. More... | |
Protected Member Functions | |
virtual NPacket * | internalClonePacket (NPacket *parent) const |
Makes a newly allocated copy of this packet. More... | |
virtual void | writeXMLPacketData (std::ostream &out) const |
Writes a chunk of XML containing the data for this packet only. More... | |
void | cloneFrom (const NTriangulation &from) |
Turns this triangulation into a clone of the given triangulation. More... | |
void | writeXMLPacketTree (std::ostream &out) const |
Writes a chunk of XML containing the subtree with this packet as matriarch. More... | |
Friends | |
class | regina::NXMLSnapPeaReader |
Packet Administration | |
virtual void | writeTextShort (std::ostream &out) const |
Writes this object in short text format to the given output stream. More... | |
virtual void | writeTextLong (std::ostream &out) const |
Writes this object in long text format to the given output stream. More... | |
virtual bool | dependsOnParent () const |
Determines if this packet depends upon its parent. More... | |
static NXMLPacketReader * | getXMLReader (NPacket *parent, NXMLTreeResolver &resolver) |
Offers direct access to the SnapPea kernel from within Regina.
An object of this class represents a 3-manifold triangulation, stored directly in the SnapPea kernel using SnapPea's internal format.
Regarding interaction with the SnapPea kernel:
Regarding the inherited NTriangulation interface:
Null triangulations appear more generally when Regina is unable to represent data in SnapPea's native format. You can test for a null triangulation by calling isNull(). Null triangulations can occur for several reasons, such as (but not limited to):
Regarding fillings: SnapPea can store and manipulate Dehn fillings on cusps, and the NSnapPeaTriangulation class respects these where it can (but with restrictions on the possible filling coefficients; see below). However, Regina's own NTriangulation class knows nothing about fillings at all. Therefore:
For now, NSnapPeaTriangulation only supports the following types of filling coefficients: on orientable cusps the filling coefficients must be coprime integers, and non non-orientable cusps the filling coefficients must be the integers (±1, 0). Any attempt to import a triangulation from a SnapPea file with filling coefficients outside these requirements will result in a null triangulation (as discussed above).
There are many places in the SnapPea kernel where SnapPea throws a fatal error. As of Regina 4.96, these fatal errors are converted into exceptions (subclassed from SnapPeaException), which can be caught and handled politely.
Regina uses the variant of the SnapPea kernel that is shipped with SnapPy 2.2 (standard precision), as well as some additional code written explicitly for SnapPy. The SnapPea kernel was written by Jeff Weeks, and SnapPy was written by Marc Culler, Nathan Dunfield, and others. SnapPy and the corresponding SnapPea kernel are distributed under the terms of the GNU General Public License, version 2 or any later version, as published by the Free Software Foundation.
See http://snappy.computop.org/ for further information on SnapPea and its successor SnapPy.
|
inherited |
Used to iterate through boundary components.
|
inherited |
A deprecated typedef for ChangeEventSpan.
|
inherited |
Used to iterate through components.
|
inherited |
Used to iterate through edges.
|
inherited |
A deprecated alias for TriangleIterator.
|
inherited |
Used to iterate through tetrahedra.
|
inherited |
Used to iterate through triangles.
|
inherited |
A map from (r, whichRoot) pairs to Turaev-Viro invariants.
|
inherited |
Used to iterate through vertices.
|
inline |
Creates a null triangulation, with no internal SnapPea data at all.
regina::NSnapPeaTriangulation::NSnapPeaTriangulation | ( | const std::string & | fileNameOrContents | ) |
Creates a new SnapPea triangulation from the contents of SnapPea data file.
The argument may be the name of a SnapPea file, or it may also be the contents of a SnapPea file (so the file itself need not actually exist on the filesystem).
This routine uses the SnapPea kernel to read the data file, and so all SnapPea-specific information will be preserved (including information that Regina itself does not store, such as peripheral curves).
If this operation is successful, this constructor will immediately ask SnapPea to try to find a hyperbolic structure.
If this operation fails (e.g., if the given string does not represent a valid SnapPea data file), then this will be a null triangulation. You can test for this by calling isNull().
The triangulation will automatically be given a packet label based on the manifold name stored in the second line of the SnapPea data file.
fileNameOrContents | either the name of a SnapPea data file, or the contents of a SnapPea data file (which need not actually exist on the filesystem). |
regina::NSnapPeaTriangulation::NSnapPeaTriangulation | ( | const NSnapPeaTriangulation & | tri | ) |
Creates a clone of the given SnapPea triangulation.
This copy will be independent (i.e., this triangulation will not be affected if tri is later changed or destroyed).
If tri is a null triangulation then this will be a null triangulation also. See isNull() for further details.
tri | the SnapPea triangulation to clone. |
regina::NSnapPeaTriangulation::NSnapPeaTriangulation | ( | const NTriangulation & | tri, |
bool | ignored = false |
||
) |
Converts the given Regina triangulation to a SnapPea triangulation.
This copy will be independent (i.e., this triangulation will not be affected if tri is later changed or destroyed).
Since Regina works with more general kinds of trianguations than SnapPea, not all Regina triangulations can be represented in SnapPea format. If the conversion is unsuccessful, this will be marked as a null triangulation. You should always test isNull() to determine whether the conversion was successful.
Regarding the conversion:
Regarding peripheral curves: native Regina triangulations do not store or use peripheral curves themselves, and so this constructor makes a default choice during the conversion process. Specifically:
Regarding internal vertices (i.e., vertices whose links are spheres): SnapPea is designed to work only with triangulations where every vertex is ideal. As a result:
Even if SnapPea does not retriangulate the manifold (for the reasons described above), it is possible that the tetrahedron and vertex numbers might be changed in the new SnapPea triangulation. In particular, if the given Regina triangulation is orientable but not oriented, then you should expect these numbers to change.
tri | the Regina triangulation to clone. |
ignored | a legacy parameter that is now ignored. (This argument was once required if you wanted to pass a closed triangluation to SnapPea.) |
regina::NSnapPeaTriangulation::~NSnapPeaTriangulation | ( | ) |
Destroys this triangulation.
All internal SnapPea data will also be destroyed.
|
inherited |
Associates the given tag with this packet.
Each packet can have an arbitrary set of string tags associated with it. The tags are not used by this calculation engine; the feature is provided for whatever use a developer or user chooses to make of it.
Tags are case-sensitive. Tags associated with a single packet must be distinct, i.e., a particular tag cannot be associated more than once with the same packet.
tag | the tag to add. |
true
if the given tag was successfully added, or false
if the given tag was already present beforehand.
|
inherited |
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.
tet | the tetrahedron to insert. |
|
inlineinherited |
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.
|
inherited |
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 triangle and the midpoint of each edge.
|
inlineinherited |
Returns the index of the given boundary component in the triangulation.
This routine was introduced in Regina 4.5, and replaces the old getBoundaryComponentIndex(). The name has been changed because, unlike the old routine, it requires that the given boundary component belongs to the triangulation (a consequence of some significant memory optimisations).
bc | specifies which boundary component to find in the triangulation. |
|
inline |
A synonym for canonize(), which constructs the canonical retriangulation of the canonical cell decomposition.
See canonize() for further details.
NTriangulation* regina::NSnapPeaTriangulation::canonize | ( | ) | const |
Constructs the canonical retriangulation of the canonical cell decomposition.
Any fillings on the cusps of this SnapPea triangulation will be ignored. In the resulting canonical triangulation (which is one of Regina's native NTriangulation objects, not a SnapPea triangulation), these fillings will be completely forgotten.
The canonical cell decomposition is the one described in "Convex hulls and isometries of cusped hyperbolic 3-manifolds", Jeffrey R. Weeks, Topology Appl. 52 (1993), 127-149.
If the canonical cell decomposition is already a triangulation then we leave it untouched. Otherwise, the canonical retriangulation introduces internal (finite) vertices, and is defined as follows:
See canonize_part_2.c in the SnapPea source code for details.
This routine discards the hyperbolic structure along with all SnapPea-specific information (such as peripheral curves and fillings), and simply returns one of Regina's native triangulations. If you need to preserve SnapPea-specific information then you should call protoCanonize() instead.
The resulting triangulation will be newly allocated, and it is the responsibility of the caller of this routine to destroy it.
If for any reason either Regina or SnapPea are unable to construct the canonical retriangulation of the canonical cell decomposition, this routine will return 0.
canonize()
means different things for SnapPy versus the SnapPea kernel. Here Regina follows the naming convention used in the SnapPea kernel. Specifically: Regina's routine NSnapPeaTriangulation::protoCanonize() corresponds to SnapPy's Manifold.canonize()
and the SnapPea kernel's proto_canonize(manifold)
. Regina's routine NSnapPeaTriangulation::canonize() corresponds to the SnapPea kernel's canonize(manifold)
, and is not available through SnapPy at all.
|
inlinevirtualinherited |
Called before the child packets directly beneath the packet are to be reordered.
Once the reordering is done, childrenWereReordered() will be called also.
The default implementation of this routine is to do nothing.
packet | the packet being listened to. |
|
inlinevirtualinherited |
Called after the child packets directly beneath the packet have been reordered.
Before this reordering is done, childrenToBeReordered() will be called also.
The default implementation of this routine is to do nothing.
packet | the packet being listened to. |
|
inlinevirtualinherited |
Called before a child packet is to be inserted directly beneath the packet.
Once the child is removed, childWasAdded() will be called also.
The default implementation of this routine is to do nothing.
packet | the packet being listened to. |
child | the child packet to be added. |
|
inlinevirtualinherited |
Called before a child packet is to be removed from directly beneath the packet.
Note that the child packet may be about to be destroyed (although this destruction will not have happened yet). Once the child is removed, childWasRemoved() will be called also.
Note also that this packet (the parent) may have already entered its destructor (which removes and destroys all child packets as a matter of course). In this situation it may be unsafe to query or update this packet, and so the third argument inParentDestructor is provided to indicate such a situation.
The default implementation of this routine is to do nothing.
packet | the packet being listened to. |
child | the child packet to be removed. |
inParentDestructor | set to true if the parent packet is in fact being destroyed, and the child was simply removed as part of the standard subtree destruction. |
|
inlinevirtualinherited |
Called after a child packet has been inserted directly beneath the packet.
Before this child is added, childToBeAdded() will be called also.
The default implementation of this routine is to do nothing.
packet | the packet being listened to. |
child | the child packet that was added. |
|
inlinevirtualinherited |
Called after a child packet has been removed from directly beneath the packet.
Note that the child packet may be about to be destroyed (although this destruction will not have happened yet). Before this child is removed, childToBeRemoved() will be called also.
Note also that this packet (the parent) may have already entered its destructor (which removes and destroys all child packets as a matter of course). In this situation it may be unsafe to query or update this packet, and so the third argument inParentDestructor is provided to indicate such a situation.
The default implementation of this routine is to do nothing.
packet | the packet being listened to. |
child | the child packet that was removed. |
inParentDestructor | set to true if the parent packet is in fact being destroyed, and the child was simply removed as part of the standard subtree destruction. |
|
inherited |
Clones this packet (and possibly its descendants), assigns to it a suitable unused label and inserts the clone into the tree as a sibling of this packet.
Note that any string tags associated with this packet will not be cloned.
If this packet has no parent in the tree structure, no clone will be created and 0 will be returned.
cloneDescendants | true if the descendants of this packet should also be cloned and inserted as descendants of the new packet. If this is passed as false (the default), only this packet will be cloned. |
end | true if the new packet should be inserted at the end of the parent's list of children (the default), or false if the new packet should be inserted as the sibling immediately after this packet. |
|
protectedinherited |
Turns this triangulation into a clone of the given triangulation.
The tree structure and label of this triangulation are not touched.
from | the triangulation from which this triangulation will be cloned. |
|
inherited |
Checks the eligibility of and/or performs a book closing move about the given boundary edge.
This involves taking a boundary edge of the triangulation and folding together the two boundary triangles on either side. This move is the inverse of the openBook() move, and is used to simplify the boundary of the triangulation. This move can be done if:
There are in fact several other "distinctness" conditions on the edges e1, e2, f1 and f2, but they follow automatically from the "distinct vertices" condition above.
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 (triangles, components, etc.) will be reconstructed, which means any pointers to old skeletal objects (such as the argument f) can no longer be used.
e | the edge about which to perform the move. |
check | true if we are to check whether the move is allowed (defaults to true ). |
perform | true if we are to perform the move (defaults to true ). |
true
, the function returns true
if and only if the requested move may be performed without changing the topology of the manifold. If check is false
, the function simply returns true
.
|
inherited |
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 (triangles, components, etc.) will be reconstructed, which means any pointers to old skeletal objects (such as the argument e) can no longer be used.
The eligibility requirements for this move are somewhat involved, and are discussed in detail in the collapseEdge() source code for those who are interested.
e | the edge to collapse. |
check | true if we are to check whether the move is allowed (defaults to true ). |
perform | true if we are to perform the move (defaults to true ). |
true
, the function returns true
if and only if the given edge may be collapsed without changing the topology of the manifold. If check is false
, the function simply returns true
.
|
inlineinherited |
Returns the index of the given component in the triangulation.
This routine was introduced in Regina 4.5, and replaces the old getComponentIndex(). The name has been changed because, unlike the old routine, it requires that the given component belongs to the triangulation (a consequence of some significant memory optimisations).
component | specifies which component to find in the triangulation. |
|
inherited |
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.
For non-orientable triangulations, this routine is only guaranteed to succeed if the original manifold contains no embedded two-sided projective planes. If the manifold does contain embedded two-sided projective planes, then this routine might still succeed but it might fail; however, such a failure will always be detected, and in such a case this routine will return -1 instead (without building any prime summands at all).
Note that this routine is currently only available for closed triangulations; see the list of preconditions for full details.
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 then no prime summand triangulations will be created at all, and this routine will return 0.
The underlying algorithm appears in "A new approach to crushing 3-manifold triangulations", Discrete and Computational Geometry 52:1 (2014), pp. 116-139. This algorithm is based on the Jaco-Rubinstein 0-efficiency algorithm, and works in both orientable and non-orientable settings.
primeParent | the packet beneath which the new prime summand triangulations will be inserted, or 0 if they should be inserted directly beneath this triangulation. |
setLabels | true if the new prime summand triangulations should be assigned unique packet labels, or false if they should be left without labels at all. |
|
inherited |
Forms the connected sum of this triangulation with the given triangulation.
This triangulation will be altered directly.
If this and the given triangulation are both oriented, then the result will be oriented also, and the connected sum will respect these orientations.
This and/or the given triangulation may be bounded or ideal, or even invalid; in all cases the connected sum will be formed correctly. Note, however, that the result might possibly contain internal vertices (even if the original triangulations do not).
other | the triangulation to sum with this. |
|
inline |
Returns the total number of complete cusps (that is, unfilled cusps).
It is always true that countCompleteCusps() + countFilledCusps() == countCusps()
.
Manifold.cusp_info('is_complete')
.
|
inline |
Returns the total number of cusps (both filled and complete).
This returns the same value as the inherited function NTriangulation::getNumberOfBoundaryComponents().
Manifold.num_cusps()
.
|
inline |
Returns the total number of filled cusps.
It is always true that countCompleteCusps() + countFilledCusps() == countCusps()
.
Manifold.cusp_info('is_complete')
.
|
inline |
Returns information about the given cusp of this manifold.
This information includes the filling coefficients (if any), along with other combinatorial information.
Manifold.cusp_info()[c]
, though the set of information returned about each cusp is different.These NCusp objects should be considered temporary only. They are preserved if you change the fillings (via fill() or unfill()). However, if you change the SnapPea triangulation itself (e.g., via randomize()), then all cusp objects will be deleted and replaced with new ones (using fresh data re-fetched from the SnapPea kernel).
whichCusp | the index of a cusp according to SnapPea; this must be between 0 and countCusps()-1 inclusive. |
|
inherited |
Dehydrates this triangulation into an alphabetical string.
A dehydration string is a compact text representation of a triangulation, introduced by Callahan, Hildebrand and Weeks for their cusped hyperbolic census (see below). The dehydration string of an n-tetrahedron triangulation consists of approximately (but not precisely) 5n/2 lower-case letters.
Dehydration strings come with some restrictions:
The routine rehydrate() can be used to recover a triangulation from a dehydration string. Note that the triangulation recovered might not be identical to the original, but it is guaranteed to be an isomorphic copy.
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.
|
inlinevirtual |
Determines if this packet depends upon its parent.
This is true if the parent cannot be altered without invalidating or otherwise upsetting this packet.
true
if and only if this packet depends on its parent. Reimplemented from regina::NTriangulation.
|
inherited |
Returns the output from writeTextLong() as a string.
|
static |
Specifies that the SnapPea kernel should not write diagnostic messages to standard output.
Calling this routine is equivalent to calling enableKernelMessages(false).
Note that diagnostic messages are already disabled by default.
This routine (which interacts with static data) is thread-safe.
|
inherited |
Drills out a regular neighbourhood of the given edge of the triangulation.
This is done by (i) performing two barycentric subdivisions, (ii) removing all tetrahedra that touch the original edge, and (iii) simplifying the resulting triangulation.
e | the edge to drill out. |
void regina::NSnapPeaTriangulation::dump | ( | ) | const |
Deprecated routine that dumps the full internal SnapPea data to standard output, using SnapPea's file format.
Note that the SnapPea data is written using C-style output (i.e., using the stdout file pointer), which may or may not cause unexpected behaviour when used in conjunction with std::cout.
If this triangulation does not contain any valid SnapPea data (i.e., isNull() returns true
), then this routine will do nothing.
|
inherited |
Returns C++ code that can be used with insertConstruction() to reconstruct this triangulation.
The code produced will consist of the following:
The main purpose of this routine is to generate the two integer arrays, which can be tedious and error-prone to code up by hand.
Note that the number of lines of code produced grows linearly with the number of tetrahedra. If this triangulation is very large, the returned string will be very large as well.
|
inlineinherited |
Returns the index of the given edge in the triangulation.
This routine was introduced in Regina 4.5, and replaces the old getEdgeIndex(). The name has been changed because, unlike the old routine, it requires that the given edge belongs to the triangulation (a consequence of some significant memory optimisations).
edge | specifies which edge to find in the triangulation. |
|
static |
Configures whether or not the SnapPea kernel should write diagnostic messages to standard output.
By default such diagnostic messages are disabled.
This routine (which interacts with static data) is thread-safe.
enabled | true if diagnostic messages should be enabled, or false otherwise. |
|
staticinherited |
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.
in | the input stream from which text will be read. |
out | the output stream to which prompts will be written. |
|
inlineinherited |
A deprecated alias for triangleIndex().
This routine returns the index of the given triangle in the triangulation. See triangleIndex() for further details.
triangle | specifies which triangle to find in the triangulation. |
bool regina::NSnapPeaTriangulation::fill | ( | int | m, |
int | l, | ||
unsigned | whichCusp = 0 |
||
) |
Assigns a Dehn filling to the given cusp.
This routine will automatically ask SnapPea to update the hyperbolic structure according to the new filling coefficients.
The triangulation itself will not change; this routine will simply ask SnapPea to store the given filling coefficients alongside the cusp, to be used in operations such as computing hyperbolic structures. If you wish to retriangulate to permanently fill the cusp, call filledTriangulation() instead.
For orientable cusps only coprime filling coefficients are allowed, and for non-orientable cusps only (±1, 0) fillings are allowed. Although SnapPea can handle more general fillings, Regina will enforce these conditions; if they are not satisfied then it will do nothing and simply return false
.
As a special case however, you may pass (0, 0) as the filling coefficients, in which case this routine will behave identically to unfill().
It is possible that, if the given integers are extremely large, SnapPea cannot convert the filling coefficients to its own internal floating-point representation. If this happens then this routine will again do nothing and simply return false
.
m | the first (meridional) filling coefficient. |
l | the second (longitudinal) filling coefficient. |
whichCusp | the index of the cusp to fill according to SnapPea; this must be between 0 and countCusps()-1 inclusive. |
true
if and only if the filling coefficients were accepted (according to the conditions outlined above). NTriangulation* regina::NSnapPeaTriangulation::filledTriangulation | ( | unsigned | whichCusp | ) | const |
Retriangulates to permanently fill the given cusp.
This uses the current Dehn filling coefficients on the cusp, as set by fill().
If this triangulation has more than one cusp to begin with, then the result will be a new instance of NSnapPeaTriangulation, and will have one fewer cusp. Note that the remaining cusps may be reindexed, and all NCusp structures will be destroyed and rebuilt. Auxiliary information on the remaining cusps (such as filling coefficients and peripheral curves) will be preserved, and SnapPea will automatically attempt to compute a hyperbolic structure on the new triangulation.
If this triangulation has only one cusp, then the result will be a new instance of NTriangulation (not NSnapPeaTriangulation), and will represent a closed manifold.
Either way, the result will be a newly allocated triangulation, and it is the responsibility of the caller of this routine to destroy it. The original triangulation (this object) will be left unchanged. If the given cusp is complete or if this is a null triangulation, then this routine will simply return 0.
whichCusp | the index of the cusp to permanently fill according to SnapPea; this must be between 0 and countCusps()-1 inclusive. |
NTriangulation* regina::NSnapPeaTriangulation::filledTriangulation | ( | ) | const |
Retriangulates to permanently fill all non-complete cusps.
This uses the current Dehn filling coefficients on the cusps, as set by fill().
If every cusp of this triangulation is complete, this routine will simply return a new clone of this triangulation.
If some but not all cusps are complete, then the result will be a new instance of NSnapPeaTriangulation, and will have fewer cusps. Note that the remaining cusps may be reindexed, and all NCusp structures will be destroyed and rebuilt. Auxiliary information on the remaining cusps (such as peripheral curves) will be preserved, and SnapPea will automatically attempt to compute a hyperbolic structure on the new triangulation.
If all cusps of this triangulation have filling coefficients assigned, then the result will be a new instance of NTriangulation (not NSnapPeaTriangulation), and will represent a closed manifold.
Whatever happens, the result will be a newly allocated triangulation, and it is the responsibility of the caller of this routine to destroy it. The original triangulation (this object) will be left unchanged. If this is a null triangulation, then this routine will simply return 0.
|
inherited |
Finds all ways in which this triangulation is combinatorially isomorphic to the given triangulation.
This routine behaves identically to isIsomorphicTo(), except that instead of returning just one isomorphism, all such isomorphisms are returned.
See the isIsomorphicTo() notes for additional information.
The isomorphisms that are found will be inserted into the given list. These isomorphisms will be newly created, and the caller of this routine is responsible for destroying them. The given list will not be emptied before the new isomorphisms are inserted.
other | the triangulation to compare with this one. |
results | the list in which any isomorphisms found will be stored. |
|
inherited |
Finds all ways in which an isomorphic copy of this triangulation is contained within the given triangulation, possibly as a subcomplex of some larger component (or components).
This routine behaves identically to isContainedIn(), except that instead of returning just one isomorphism (which may be boundary incomplete and need not be onto), all such isomorphisms are returned.
See the isContainedIn() notes for additional information.
The isomorphisms that are found will be inserted into the given list. These isomorphisms will be newly created, and the caller of this routine is responsible for destroying them. The given list will not be emptied before the new isomorphisms are inserted.
other | the triangulation in which to search for isomorphic copies of this triangulation. |
results | the list in which any isomorphisms found will be stored. |
|
inherited |
Finds the packet with the requested label in the tree or subtree for which this packet is matriarch.
Note that label comparisons are case sensitive.
label | the label to search for. |
|
inherited |
Finds the packet with the requested label in the tree or subtree for which this packet is matriarch.
Note that label comparisons are case sensitive.
label | the label to search for. |
|
inherited |
Searches for a strict angle structure on this triangulation.
Recall that a strict angle structure is one in which every angle is strictly between 0 and π. If a strict angle structure does exist, then this routine is guaranteed to find one.
The underlying algorithm runs a single linear program (it does not enumerate all vertex angle structures). This means that it is likely to be fast even for large triangulations.
If you are only interested in whether a strict angle structure exists (i.e., you are not interested in the specific angles themselves), then you may call hasStrictAngleStructure() instead.
The angle structure returned (if any) is cached internally alongside this triangulation. This means that, as long as the triangulation does not change, subsequent calls to findStrictAngleStructure() will return identical pointers and will be essentially instantaneous.
If the triangulation changes however, then the cached angle structure will be deleted. This means that you should not store the returned pointer for later use; instead you should just call findStrictAngleStructure() again.
|
inherited |
Converts each real boundary component into a cusp (i.e., an ideal vertex).
Only boundary components formed from real tetrahedron faces will be affected; ideal boundary components are already cusps and so will not be changed.
One side-effect of this operation is that all spherical boundary components will be filled in with balls.
This operation is performed by attaching a new tetrahedron to each boundary triangle and then gluing these new tetrahedra together in a way that mirrors the adjacencies of the underlying boundary triangles. Each boundary component will thereby be pushed up through the new tetrahedra and converted into a cusp formed using vertices of these new tetrahedra.
Note that this operation is a loose converse of idealToFinite().
true
if changes were made, or false
if the original triangulation contained no real boundary components.
|
inherited |
Finds the first packet of the requested type in a complete depth-first iteration of the tree structure.
Note that this packet must be the matriarch of the entire tree.
A parent packet is always reached before its children. The tree matriarch will be the first packet visited in a complete depth-first iteration.
type | the type of packet to search for, as returned by getPacketTypeName(). Note that string comparisons are case sensitive. |
|
inherited |
Finds the first packet of the requested type in a complete depth-first iteration of the tree structure.
Note that this packet must be the matriarch of the entire tree.
A parent packet is always reached before its children. The tree matriarch will be the first packet visited in a complete depth-first iteration.
type | the type of packet to search for, as returned by getPacketTypeName(). Note that string comparisons are case sensitive. |
|
inherited |
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 (i) the edge is valid and non-boundary, and (ii) 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 (triangles, components, etc.) will be reconstructed, which means any pointers to old skeletal objects (such as the argument e) can no longer be used.
e | the edge about which to perform the move. |
newAxis | Specifies which axis of the octahedron the new tetrahedra should meet along; this should be 0 or 1. Consider the four original tetrahedra in the order described by NEdge::getEmbeddings(); call these tetrahedra 0, 1, 2 and
|
check | true if we are to check whether the move is allowed (defaults to true ). |
perform | true if we are to perform the move (defaults to true ). |
true
, the function returns true
if and only if the requested move may be performed without changing the topology of the manifold. If check is false
, the function simply returns true
.
|
staticinherited |
Recovers a full triangulation from an isomorphism signature.
See isoSig() for more information on isomorphism signatures. It will be assumed that the signature describes a triangulation of dimension dim.
The triangulation that is returned will be newly created.
Calling isoSig() followed by fromIsoSig() is not guaranteed to produce an identical triangulation to the original, but it is guaranteed to produce a combinatorially isomorphic triangulation.
For a full and precise description of the isomorphism signature format for 3-manifold triangulations, see Simplification paths in the Pachner graphs of closed orientable 3-manifold triangulations, Burton, 2011, arXiv:1110.6080
. The format for other dimensions is essentially the same, but with minor dimension-specific adjustments.
sig | the isomorphism signature of the triangulation to construct. Note that, unlike dehydration strings for 3-manifold triangulations, case is important for isomorphism signatures. |
|
staticinherited |
Extracts the tetrahedron gluings from a string that contains the full contents of a SnapPea data file.
All other SnapPea-specific information (such as peripheral curves) will be ignored, since Regina's NTriangulation class does not track such information itself.
If you wish to preserve all SnapPea-specific information from the data file, you should work with the NSnapPeaTriangulation class instead (which uses the SnapPea kernel directly, and can therefore store anything that SnapPea can).
If you wish to read a triangulation from a SnapPea file, you should likewise call the NSnapPeaTriangulation constructor, giving the filename as argument. This will read all SnapPea-specific information (as described above), and also avoids constructing an enormous intermediate string.
The triangulation that is returned will be newly created. If the SnapPea data is not in the correct format, this routine will return 0 instead.
snapPeaData | a string containing the full contents of a SnapPea data file. |
const NGroupPresentation* regina::NSnapPeaTriangulation::fundamentalGroupFilled | ( | bool | simplifyPresentation = true , |
bool | fillingsMayAffectGenerators = true , |
||
bool | minimiseNumberOfGenerators = true |
||
) | const |
Returns the fundamental group of the manifold with respect to the current Dehn filling (if any).
Any complete cusps (without fillings) will be treated as though they had been truncated.
This is different from the inherited getFundamentalGroup() routine from the parent NTriangulation class:
Note that each time the triangulation changes, the fundamental group will be deleted. Thus the pointer that is returned from this routine should not be kept for later use. Instead, fundamentalGroupFilled() should be called again; this will be instantaneous if the group has already been calculated.
simplifyPresentation | true if SnapPea should attempt to simplify the group presentation, or false if it should be left unsimplified. Even if simplifyPresentation is false , this routine will always eliminate adjacent (x, x^-1) pairs. |
fillingsMayAffectGenerators | true if SnapPea's choice of generators is allowed to depend on the Dehn fillings, or false if the choice of generators should be consistent across different fillings. |
minimiseNumberOfGenerators | true if SnapPea's group simplification code should try to reduce the number of generators at the expense of increasing the total length of the relations, or false if it should do the opposite. |
|
inlineinherited |
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.
index | the index of the desired boundary component, ranging from 0 to getNumberOfBoundaryComponents()-1 inclusive. |
|
inlineinherited |
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.
|
inlineinherited |
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.
index | the index of the desired component, ranging from 0 to getNumberOfComponents()-1 inclusive. |
|
inlineinherited |
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.
|
inlineinherited |
Returns the requested edge in this triangulation.
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.
index | the index of the desired edge, ranging from 0 to getNumberOfEdges()-1 inclusive. |
|
inlineinherited |
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.
|
inlineinherited |
A deprecated alias for getEulerCharTri().
This routine calculates the Euler characteristic of this triangulation. Since it treats cusps in a non-standard way, it was renamed to getEulerCharTri() in Regina 4.4 to clarify that this might differ from the Euler characteristic of the corresponding compact manifold.
See getEulerCharTri() for further details.
|
inherited |
Returns the Euler characteristic of the corresponding compact 3-manifold.
Instead of simply calculating V-E+F-T, this routine also:
For ideal triangulations, this routine therefore computes the proper Euler characteristic of the manifold (unlike getEulerCharTri(), which does not).
For triangulations whose vertex links are all spheres or discs, this routine and getEulerCharTri() give identical results.
|
inlineinherited |
Returns the Euler characteristic of this triangulation.
This will be evaluated strictly as V-E+F-T.
Note that this routine handles cusps in a non-standard way. Since it computes the Euler characteristic of the triangulation (and not the underlying manifold), this routine will treat each cusp as a single vertex, and not as a surface boundary component.
For a routine that handles cusps properly (i.e., treats them as surface boundary components when computing the Euler characteristic), see getEulerCharManifold() instead.
This routine was previously called getEulerCharacteristic() in Regina 4.3.1 and earlier. It was renamed in Regina 4.4 to clarify the non-standard handling of cusps.
|
inlineinherited |
A deprecated alias for getTriangle().
This routine returns the requested triangular face in the triangulation. See getTriangle() for further details.
index | the index of the desired triangle, ranging from 0 to getNumberOfTriangles()-1 inclusive. |
|
inlineinherited |
A deprecated alias for getTriangles().
This routine returns all triangular faces in this triangulation. See getTriangles() for further details.
|
inlineinherited |
Determines the first child of this packet in the tree structure.
This routine takes small constant time.
|
inherited |
Returns a descriptive text string for the packet.
The string is of the form label (packet-type).
The packet label will be adjusted for human-readable output according to the behaviour of getHumanLabel().
|
inherited |
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 reference that is returned from this routine 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()).
|
inherited |
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 reference that is returned from this routine 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()).
|
inherited |
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 reference that is returned from this routine 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.
|
inherited |
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 reference that is returned from this routine should not be kept for later use. Instead, getHomologyH1Rel() should be called again; this will be instantaneous if the group has already been calculated.
|
inherited |
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 reference that is returned from this routine should not be kept for later use. Instead, getHomologyH2() should be called again; this will be instantaneous if the group has already been calculated.
|
inlineinherited |
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.
|
inlineinherited |
Returns the label associated with this individual packet, adjusted if necessary for human-readable output.
In particular, if the packet has no label assigned then this routine will return "(no label)", not the empty string.
|
inlineinherited |
Determines the last child of this packet in the tree structure.
This routine takes small constant time.
|
inlineinherited |
Determines the next sibling of this packet in the tree structure.
This is the child of the parent that follows this packet.
This routine takes small constant time.
|
inlineinherited |
Returns the number of boundary components in this triangulation.
Note that each ideal vertex forms its own boundary component.
|
inlineinherited |
Returns the number of boundary triangles in this triangulation.
|
inherited |
Returns the number of immediate children of this packet.
Grandchildren and so on are not counted.
|
inlineinherited |
Returns the number of components in this triangulation.
|
inlineinherited |
Returns the total number of descendants of this packet.
This includes children, grandchildren and so on. This packet is not included in the count.
|
inlineinherited |
Returns the number of edges in this triangulation.
|
inlineinherited |
A deprecated alias for getNumberOfTriangles().
This routine returns the number of triangular faces in this triangulation. See getNumberOfTriangles() for further details.
Do not confuse this deprecated alias with the (non-deprecated) tempate function getNumberOfFaces<dim>().
|
inherited |
Returns the number of faces of the given dimension in this triangulation.
This template function is to assist with writing dimension-agnostic code that can be reused to work in different dimensions.
|
inlineinherited |
A dimension-agnostic alias for getNumberOfTetrahedra().
This is to assist with writing dimension-agnostic code that can be reused to work in different dimensions.
Here "simplex" refers to a top-dimensional simplex (which for 3-manifold triangulations means a tetrahedron).
See getNumberOfTetrahedra() for further information.
|
inlineinherited |
Returns the number of tetrahedra in the triangulation.
|
inlineinherited |
Returns the number of triangular faces in this triangulation.
|
inlineinherited |
Returns the number of vertices in this triangulation.
|
inlineinherited |
Returns the label associated with this individual packet.
An example is MyTriangulation
. Each individual packet in the overall tree structure must have a unique label.
|
pure virtualinherited |
Returns the unique integer ID representing this type of packet.
This is the same for all packets of this class.
|
pure virtualinherited |
Returns an English name for this type of packet.
An example is NTriangulation
. This is the same for all packets of this class.
|
inlineinherited |
Determines the previous sibling of this packet in the tree structure.
This is the child of the parent that precedes this packet.
This routine takes small constant time.
|
inlineinherited |
A dimension-agnostic alias for getTetrahedron().
This is to assist with writing dimension-agnostic code that can be reused to work in different dimensions.
Here "simplex" refers to a top-dimensional simplex (which for 3-manifold triangulations means a tetrahedron).
See getTetrahedron() for further information.
|
inlineinherited |
A dimension-agnostic alias for getTetrahedron().
This is to assist with writing dimension-agnostic code that can be reused to work in different dimensions.
Here "simplex" refers to a top-dimensional simplex (which for 3-manifold triangulations means a tetrahedron).
See getTetrahedron() for further information.
|
inlineinherited |
A dimension-agnostic alias for getTetrahedra().
This is to assist with writing dimension-agnostic code that can be reused to work in different dimensions.
Here "simplex" refers to a top-dimensional simplex (which for 3-manifold triangulations means a tetrahedron).
See getTetrahedra() for further information.
|
inlineinherited |
Returns the set of all tags associated with this packet.
Each packet can have an arbitrary set of string tags associated with it. The tags are not used by this calculation engine; the feature is provided for whatever use a developer or user chooses to make of it.
Tags are case-sensitive. Tags associated with a single packet must be distinct, i.e., a particular tag cannot be associated more than once with the same packet.
|
inlineinherited |
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.
|
inlineinherited |
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.
index | specifies which tetrahedron to return; this value should be between 0 and getNumberOfTetrahedra()-1 inclusive. |
index
th tetrahedron in the triangulation.
|
inlineinherited |
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.
index | specifies which tetrahedron to return; this value should be between 0 and getNumberOfTetrahedra()-1 inclusive. |
index
th tetrahedron in the triangulation.
|
inherited |
Determines the total number of packets in the tree or subtree for which this packet is matriarch.
This packet is included in the count.
|
inherited |
Determines the matriarch (the root) of the tree to which this packet belongs.
|
inlineinherited |
Determines the parent packet in the tree structure.
This routine takes small constant time.
|
inlineinherited |
Returns the requested triangular face in this triangulation.
Bear in mind that each time the triangulation changes, the triangles will be deleted and replaced with new ones. Thus this object should be considered temporary only.
index | the index of the desired triangle, ranging from 0 to getNumberOfTriangles()-1 inclusive. |
|
inlineinherited |
Returns all triangular faces of this triangulation.
Bear in mind that each time the triangulation changes, the triangles 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.
|
inlineinherited |
Returns the requested vertex in this triangulation.
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.
index | the index of the desired vertex, ranging from 0 to getNumberOfVertices()-1 inclusive. |
|
inlineinherited |
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.
NMatrixInt* regina::NSnapPeaTriangulation::gluingEquations | ( | ) | const |
Returns a matrix describing Thurston's gluing equations.
This will be with respect to the current Dehn filling (if any).
Each row of this matrix will describe a single equation. The first getNumberOfEdges() rows will list the edge equations, and the following 2 * countCompleteCusps() + countFilledCusps() rows will list the cusp equations.
The edge equations will be ordered arbitrarily. The cusp equations will be presented in pairs ordered by cusp index (as stored by SnapPea); within each pair the meridian equation will appear before the longitude equation. The NCusp::vertex() method (which is accessed through the cusp() routine) can help translate between SnapPea's cusp numbers and Regina's vertex numbers.
The matrix will contain 3 * getNumberOfTetrahedra()
columns. The first three columns represent shape parameters z
, 1/(1-z)
and (z-1)/z
for the first tetrahedron; the next three columns represent shape parameters z
, 1/(1-z)
and (z-1)/z
for the second tetrahedron, and so on. By Regina's edge numbering conventions, z
corresponds to edges 0 and 5 of the tetrahedron, 1/(1-z)
corresponds to edges 1 and 4 of the tetrahedron, and (z-1)/z
corresponds to edges 2 and 3 of the tetrahedron.
More specifically, a row of the form a b c d e f ...
describes an equation with left hand side a * log(z0) + b * log(1/(1-z0)) + c * log((z0-1)/z) + d * log(z1) + ... = 2 pi i
, and with right hand side 2 pi i
for an edge equation or 0 for a cusp equation.
See also gluingEquationsRect(), which returns the gluing equations in a more streamlined form.
Manifold.gluing_equations()
.NMatrixInt* regina::NSnapPeaTriangulation::gluingEquationsRect | ( | ) | const |
Returns a matrix describing Thurston's gluing equations in a streamlined form.
This will be with respect to the current Dehn filling (if any).
Each row of this matrix will describe a single equation. The rows begin with the edge equations (in arbitrary order) followed by the cusp equations (ordered by cusp index); for precise details see the documentation for gluingEquations(), which uses the same ordering.
The matrix will contain 2 * getNumberOfTetrahedra() + 1
columns. Let k = getNumberOfTetrahedra()-1, and suppose the shape parameters for tetrahedra 0, 1, ..., k are z0, z1, ..., zk (here each shape parameter corresponds to edges 0 and 5 of the corresponding tetrahedron). Then a row of the form a0 a1 ... ak b0 b1 ... bk c
describes the equation z0^a0 z1^a1 ... zk^ak (1-z0)^b0 (1-z1)^b1 ... (1-zk)^bk = c
, where c will always be 1 or -1.
See also gluingEquations(), which returns the gluing equations in a more transparent term-by-term form.
Manifold.gluing_equations(form='rect')
.
|
inlineinherited |
This routine now does nothing, and should not be used.
|
inlineinherited |
A deprecated alias for hasBoundaryTriangles().
This routine determines whether this triangulation has any boundary triangles. See hasBoundaryTriangles() for further details.
true
if and only if there are boundary triangles.
|
inlineinherited |
Determines if this triangulation has any boundary triangles.
true
if and only if there are boundary triangles.
|
inherited |
Searches for a compressing disc within the underlying 3-manifold.
Let M be the underlying 3-manifold and let B be its boundary. By a compressing disc, we mean a disc D properly embedded in M, where the boundary of D lies in B but does not bound a disc in B.
This routine will first call the heuristic routine hasSimpleCompressingDisc() in the hope of obtaining a fast answer. If this fails, it will do one of two things:
This routine will work on a copy of this triangulation, not the original. In particular, the copy will be simplified, which means that there is no harm in calling this routine on an unsimplified triangulation.
If this triangulation has no boundary components, this routine will simply return false
.
true
if the underlying 3-manifold contains a compressing disc, or false
if it does not.
|
inlineinherited |
Determines if this triangulation contains any ideal boundary components with negative Euler characteristic.
true
if and only if there is at least one such boundary component.
|
inherited |
Searches for a non-vertex-linking normal sphere or disc within this triangulation.
If such a surface exists within this triangulation, this routine is guaranteed to find one.
Note that the surface returned (if any) depends upon this triangulation, and so the surface must be destroyed before this triangulation is destroyed.
|
inherited |
Searches for an octagonal almost normal 2-sphere within this triangulation.
If such a surface exists, this routine is guaranteed to find one.
Note that the surface returned (if any) depends upon this triangulation, and so the surface must be destroyed before this triangulation is destroyed.
|
inherited |
Searches for a "simple" compressing disc inside this triangulation.
Let M be the underlying 3-manifold and let B be its boundary. By a compressing disc, we mean a disc D properly embedded in M, where the boundary of D lies in B but does not bound a disc in B.
By a simple compressing disc, we mean a compressing disc that has a very simple combinatorial structure (here "simple" is subject to change; see the warning below). Examples include the compressing disc inside a 1-tetrahedron solid torus, or a compressing disc formed from a single internal triangle surrounded by three boundary edges.
The purpose of this routine is to avoid working with normal surfaces within a large triangulation where possible. This routine is relatively fast, and if it returns true
then this 3-manifold definitely contains a compressing disc. If this routine returns false
then there might or might not be a compressing disc; the user will need to perform a full normal surface enumeration using hasCompressingDisc() to be sure.
This routine will work on a copy of this triangulation, not the original. In particular, the copy will be simplified, which means that there is no harm in calling this routine on an unsimplified triangulation.
If this triangulation has no boundary components, this routine will simply return false
.
For further information on this test, see "The Weber-Seifert dodecahedral space is non-Haken", Benjamin A. Burton, J. Hyam Rubinstein and Stephan Tillmann, Trans. Amer. Math. Soc. 364:2 (2012), pp. 911-932.
true
if a simple compressing disc was found, or false
if not. Note that even with a return value of false
, there might still be a compressing disc (just not one with a simple combinatorial structure).
|
inherited |
Determines whether this triangulation has a normal splitting surface.
See NNormalSurface::isSplitting() for details regarding normal splitting surfaces.
true
if and only if this triangulation has a normal splitting surface.
|
inlineinherited |
Determines whether this triangulation supports a strict angle structure.
Recall that a strict angle structure is one in which every angle is strictly between 0 and π.
This routine is equivalent to calling findStrictAngleStructure() and testing whether the return value is non-null.
The underlying algorithm runs a single linear program (it does not enumerate all vertex angle structures). This means that it is likely to be fast even for large triangulations.
true
if a strict angle structure exists on this triangulation, or 0 if not.
|
inlineinherited |
Determines whether this packet has the given associated tag.
Each packet can have an arbitrary set of string tags associated with it. The tags are not used by this calculation engine; the feature is provided for whatever use a developer or user chooses to make of it.
Tags are case-sensitive. Tags associated with a single packet must be distinct, i.e., a particular tag cannot be associated more than once with the same packet.
tag | the tag to search for. |
true
if the given tag is found, false
otherwise.
|
inlineinherited |
Determines whether this packet has any associated tags at all.
Each packet can have an arbitrary set of string tags associated with it. The tags are not used by this calculation engine; the feature is provided for whatever use a developer or user chooses to make of it.
Tags are case-sensitive. Tags associated with a single packet must be distinct, i.e., a particular tag cannot be associated more than once with the same packet.
true
if this packet has any tags, false
otherwise.
|
inlineinherited |
Determines if this triangulation contains any two-sphere boundary components.
true
if and only if there is at least one two-sphere boundary component. const NAbelianGroup* regina::NSnapPeaTriangulation::homologyFilled | ( | ) | const |
Returns the first homology group of the manifold with respect to the current Dehn filling (if any).
Any complete cusps (without fillings) will be treated as though they had been truncated.
This is different from the inherited getHomologyH1() routine from the parent NTriangulation class:
This routine uses exact arithmetic, and so you are guaranteed that - if it returns a result at all - that this result does not suffer from integer overflows. Essentially, the process is this: SnapPea constructs a filled relation matrix using machine integer arithmetic (but detects overflow and returns null
in such cases), and then Regina uses exact integer arithmetic to solve for the abelian group invariants (i.e., Smith normal form).
The situations in which this routine might return null
are the following:
true
);Note that each time the triangulation changes, the homology group will be deleted. Thus the pointer that is returned from this routine should not be kept for later use. Instead, homologyFilled() should be called again; this will be instantaneous if the group has already been calculated.
|
inherited |
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.
Note that this operation is a loose converse of finiteToIdeal().
forceDivision | specifies what to do if the triangulation has no ideal or non-standard vertices. If true , the triangulation will be subdivided anyway, as if all vertices were ideal. If false (the default), the triangulation will be left alone. |
true
if and only if the triangulation was changed.
|
inherited |
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.
a1 | a parameter describing the first layered solid torus in the augmented triangular solid torus; this may be either positive or negative. |
b1 | a parameter describing the first layered solid torus in the augmented triangular solid torus; this may be either positive or negative. |
a2 | a parameter describing the second layered solid torus in the augmented triangular solid torus; this may be either positive or negative. |
b2 | a parameter describing the second layered solid torus in the augmented triangular solid torus; this may be either positive or negative. |
a3 | a parameter describing the third layered solid torus in the augmented triangular solid torus; this may be either positive or negative. |
b3 | a parameter describing the third layered solid torus in the augmented triangular solid torus; this may be either positive or negative. |
Inserts the given packet as a child of this packet at the given location in this packet's child list.
This routine takes small constant time.
newChild | the child to insert. |
prevChild | the preexisting child of this packet after which newChild will be inserted, or 0 if newChild is to be the first child of this packet. |
|
inherited |
Inserts the given packet as the first child of this packet.
This routine takes small constant time.
child | the child to insert. |
|
inherited |
Inserts the given packet as the last child of this packet.
This routine takes small constant time.
child | the child to insert. |
|
inherited |
Inserts into this triangulation a set of tetrahedra and their gluings as described by the given integer arrays.
This routine is provided to make it easy to hard-code a medium-sized triangulation in a C++ source file. All of the pertinent data can be hard-coded into a pair of integer arrays at the beginning of the source file, avoiding an otherwise tedious sequence of many joinTo() calls.
An additional nTetrahedra tetrahedra will be inserted into this triangulation. The relationships between these tetrahedra should be stored in the two arrays as follows. Note that the new tetrahedra are numbered from 0 to (nTetrahedra - 1), and individual tetrahedron faces are numbered from 0 to 3.
The adjacencies array describes which tetrahedron faces are joined to which others. Specifically, adjacencies[t][f]
should contain the number of the tetrahedron joined to face f of tetrahedron t. If this face is to be left as a boundary triangle, adjacencies[t][f]
should be -1.
The gluings array describes the particular gluing permutations used when joining these tetrahedron faces together. Specifically, gluings[t][f][0..3]
should describe the permutation used to join face f of tetrahedron t to its adjacent tetrahedron. These four integers should be 0, 1, 2 and 3 in some order, so that gluings[t][f][i]
contains the image of i under this permutation. If face f of tetrahedron t is to be left as a boundary triangle, gluings[t][f][0..3]
may contain anything (and will be duly ignored).
It is the responsibility of the caller of this routine to ensure that the given arrays are correct and consistent. No error checking will be performed by this routine.
Note that, for an existing triangulation, dumpConstruction() will output a pair of C++ arrays that can be copied into a source file and used to reconstruct the triangulation via this routine.
nTetrahedra | the number of additional tetrahedra to insert. |
adjacencies | describes which of the new tetrahedron faces are to be identified. This array must have initial dimension at least nTetrahedra. |
gluings | describes the specific gluing permutations by which these new tetrahedron faces should be identified. This array must also have initial dimension at least nTetrahedra. |
|
inherited |
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.
p | a parameter of the desired lens space. |
q | a parameter of the desired lens space. |
|
inherited |
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.
length | the length of the new layered loop; this must be strictly positive. |
twisted | true if the new layered loop should be twisted, or false if it should be untwisted. |
|
inherited |
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.
cuts0 | the smallest of the three desired intersection numbers. |
cuts1 | the second smallest of the three desired intersection numbers. |
|
inherited |
Inserts the rehydration of the given string into this triangulation.
If you simply wish to convert a dehydration string into a new triangulation, use the static routine rehydrate() instead. See dehydrate() for more information on dehydration strings.
This routine will first rehydrate the given string into a proper triangulation. The tetrahedra from the rehydrated triangulation will then be inserted into this triangulation in the same order in which they appear in the rehydrated triangulation, and the numbering of their vertices (0-3) will not change.
The routine dehydrate() can be used to extract a dehydration string from an existing triangulation. Dehydration followed by rehydration might not produce a triangulation identical to the original, but it is guaranteed to produce an isomorphic copy. See dehydrate() for the reasons behind this.
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.
dehydration | a dehydrated representation of the triangulation to insert. Case is irrelevant; all letters will be treated as if they were lower case. |
true
if the insertion was successful, or false
if the given string could not be rehydrated.
|
inherited |
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.
a1 | a parameter describing the first exceptional fibre. |
b1 | a parameter describing the first exceptional fibre. |
a2 | a parameter describing the second exceptional fibre. |
b2 | a parameter describing the second exceptional fibre. |
a3 | a parameter describing the third exceptional fibre. |
b3 | a parameter describing the third exceptional fibre. |
|
inherited |
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.
source | the triangulation whose copy will be inserted. |
|
inherited |
Attempts to simplify the triangulation as intelligently as possible without further input.
This routine will attempt to reduce both the number of tetrahedra and the number of boundary triangles (with the number of tetrahedra as its priority).
Currently this routine uses simplifyToLocalMinimum() in combination with random 4-4 moves, book opening moves and book closing moves.
true
if and only if the triangulation was changed.
|
inlineprotectedvirtual |
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.
parent | the parent beneath which the new packet will eventually be inserted. |
Reimplemented from regina::NTriangulation.
|
inherited |
Returns a unique string ID that identifies this packet.
The user has no control over this ID, and it is not human readable. It is guaranteed to remain fixed throughout the lifetime of the program for a given packet, and it is guaranteed not to clash with the ID of any other packet.
If you change the contents of a packet, its ID will not change.
If you clone a packet, the new clone will receive a different ID. If you save and then load a packet to/from file, the ID will change. These behaviours are necessary to ensure that IDs remain unique (since, for instance, you could load several copies of the same data file into memory simultaneously).
The ID is implemented as an encoding of the underlying C++ pointer. This encoding is subject to change in later versions of Regina.
|
inherited |
Determines whether this is a triangulation of a 3-dimensional ball.
This routine is based on isThreeSphere(), which in turn combines Rubinstein's 3-sphere recognition algorithm with Jaco and Rubinstein's 0-efficiency prime decomposition algorithm.
true
if and only if this is a triangulation of a 3-dimensional ball.
|
inlineinherited |
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.
true
if and only if this triangulation is closed.
|
inlineinherited |
Determines if this triangulation is connected.
true
if and only if this triangulation is connected.
|
inherited |
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 Isomorphism class notes.
In particular, note that facets of top-dimensional simplices that lie on the boundary of this triangulation need not correspond to boundary facets of other, and that other may contain more top-dimensional simplices 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 if (isContainedIn(other).get())
and the newly created isomorphism (if it exists) will be automatically destroyed.
If more than one such isomorphism exists, only one will be returned. For a routine that returns all such isomorphisms, see findAllSubcomplexesIn().
other | the triangulation in which to search for an isomorphic copy of this triangulation. |
|
inherited |
Determines whether this triangulation is empty.
An empty triangulation is one with no simplices at all.
true
if and only if this triangulation is empty.
|
inherited |
Determines if this packet is equal to or an ancestor of the given packet in the tree structure.
descendant | the other packet whose relationships we are examining. |
true
if and only if this packet is equal to or an ancestor of descendant
.
|
inherited |
Determines whether the underlying 3-manifold (which must be closed and orientable) is Haken.
In other words, this routine determines whether the underlying 3-manifold contains an embedded closed two-sided incompressible surface.
Currently Hakenness testing is available only for irreducible manifolds. This routine will first test whether the manifold is irreducible and, if it is not, will return false
immediately.
true
if and only if the underlying 3-manifold is irreducible and Haken.
|
inlineinherited |
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.
true
if and only if this triangulation is ideal.
|
inherited |
Determines if this triangulation is combinatorially identical to the given triangulation.
Here "identical" means that the triangulations have the same number of top-dimensional simplices, with gluings between the same pairs of numbered simplices using the same gluing permutations. In other words, "identical" means that the triangulations are isomorphic via the identity isomorphism.
To test for the less strict combinatorial isomorphism (which allows relabelling of the top-dimensional simplices and their vertices), see isIsomorphicTo() instead.
This test does not examine the textual simplex descriptions, as seen in Simplex::getDescription(); these may still differ. It also does not test the numbering of vertices, edges and so on, as used by getVertex(), getEdge() and so on; although at the time of writing these will always be numbered the same for identical triangulations, it is conceivable that in future versions of Regina there may be situations in which identical triangulations can acquire different numberings for vertices, edges, etc.
other | the triangulation to compare with this one. |
true
if and only if the two triangulations are combinatorially identical.
|
inherited |
Determines whether the underlying 3-manifold (which must be closed) is irreducible.
In other words, this routine determines whether every embedded sphere in the underlying 3-manifold bounds a ball.
If the underlying 3-manifold is orientable, this routine will use fast crushing and branch-and-bound methods. If the underlying 3-manifold is non-orientable, it will use a (much slower) full enumeration of vertex normal surfaces.
true
if and only if the underlying 3-manifold is irreducible.
|
inherited |
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 Isomorphism class notes.
In particular, note that this triangulation and other must contain the same number of top-dimensional simplices for such an isomorphism to exist.
If you need to ensure that top-dimensional simplices are labelled the same in both triangulations, see the stricter test isIdenticalTo() instead.
If a boundary complete 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 if (isIsomorphicTo(other).get())
and the newly created isomorphism (if it exists) will be automatically destroyed.
If more than one such isomorphism exists, only one will be returned. For a routine that returns all such isomorphisms, see findAllIsomorphisms().
other | the triangulation to compare with this one. |
|
inlineinherited |
Determines whether the given packet listener is currently listening for events on this packet.
See the NPacketListener class notes for details.
listener | the listener to search for. |
true
if the given listener is currently registered with this packet, or false
otherwise.
|
inline |
Determines whether this triangulation contains valid SnapPea data.
A null SnapPea triangulation can occur (for instance) when converting unusual types of Regina triangulation into SnapPea format, or when reading broken SnapPea data files. See the NSnapPeaTriangulation class notes for details.
true
if this is a null triangulation, or false
if this triangulation contains valid SnapPea data.
|
inherited |
Determines if this triangulation is ordered; that is, if tetrahedron vertices are labelled so that all gluing permutations are order-preserving on the tetrahedron faces.
Equivalently, this tests whether the edges of the triangulation can all be oriented such that they induce a consistent ordering on the vertices of each tetrahedron.
Triangulations are not ordered by default, and indeed some cannot be ordered at all. The routine order() will attempt to relabel tetrahedron vertices to give an ordered triangulation.
true
if and only if all gluing permutations are order preserving on the tetrahedron faces.
|
inlineinherited |
Determines if this triangulation is orientable.
true
if and only if this triangulation is orientable.
|
inherited |
Determines if this triangulation is oriented; that is, if tetrahedron vertices are labelled in a way that preserves orientation across adjacent tetrahedron faces.
Specifically, this routine returns true
if and only if every gluing permutation has negative sign.
Note that orientable triangulations are not always oriented by default. You can call orient() if you need the tetrahedra to be oriented consistently as described above.
A non-orientable triangulation can never be oriented.
true
if and only if all tetrahedra are oriented consistently.
|
inherited |
Constructs the isomorphism signature for this triangulation.
An isomorphism signature is a compact text representation of a triangulation. Unlike dehydrations for 3-manifold triangulations, an isomorphism signature uniquely determines a triangulation up to combinatorial isomorphism (assuming the dimension is known in advance). That is, two triangulations of dimension dim are combinatorially isomorphic if and only if their isomorphism signatures are the same.
The isomorphism signature is constructed entirely of printable characters, and has length proportional to n log n
, where n is the number of top-dimenisonal simplices.
Isomorphism signatures are more general than dehydrations: they can be used with any triangulation (including closed, bounded and/or disconnected triangulations, as well as triangulations with large numbers of triangles).
The time required to construct the isomorphism signature of a triangulation is O(n^2 log^2 n)
.
The routine fromIsoSig() can be used to recover a triangulation from an isomorphism signature. The triangulation recovered might not be identical to the original, but it will be combinatorially isomorphic.
If relabelling is non-null (i.e., it points to some Isomorphism pointer p), then it will be modified to point to a new isomorphism that describes the precise relationship between this triangulation and the reconstruction from fromIsoSig(). Specifically, the triangulation that is reconstructed from fromIsoSig() will be combinatorially identical to relabelling.apply(this)
.
For a full and precise description of the isomorphism signature format for 3-manifold triangulations, see Simplification paths in the Pachner graphs of closed orientable 3-manifold triangulations, Burton, 2011, arXiv:1110.6080
. The format for other dimensions is essentially the same, but with minor dimension-specific adjustments.
relabelling | if non-null, this will be modified to point to a new isomorphism describing the relationship between this triangulation and that reconstructed from fromIsoSig(), as described above. |
|
staticinherited |
Deduces the number of top-dimensional simplices in a connected triangulation from its isomorphism signature.
See isoSig() for more information on isomorphism signatures. It will be assumed that the signature describes a triangulation of dimension dim.
If the signature describes a connected triangulation, this routine will simply return the size of that triangulation (e.g., the number of tetrahedra in the case dim = 3). You can also pass an isomorphism signature that describes a disconnected triangulation; however, this routine will only return the number of simplices in the first connected component. If you need the total number of simplices in a disconnected triangulation, you will need to reconstruct the full triangulation by calling fromIsoSig() instead.
This routine is very fast, since it only examines the first few characters of the isomorphism signature (in which the size of the first component is encoded). However, it is therefore possible to pass an invalid isomorphism signature and still receive a positive result. If you need to test whether a signature is valid or not, you must call fromIsoSig() instead, which will examine the entire signature in full.
sig | an isomorphism signature of a dim-dimensional triangulation. Note that, unlike dehydration strings for 3-manifold triangulations, case is important for isomorphism signatures. |
|
inherited |
Determines whether this packet can be altered without invalidating or otherwise upsetting any of its immediate children.
Descendants further down the packet tree are not (and should not need to be) considered.
true
if and only if this packet may be edited.
|
inherited |
Determines whether this is a triangulation of the solid torus; that is, the unknot complement.
This routine can be used on a triangulation with real boundary triangles, or on an ideal triangulation (in which case all ideal vertices will be assumed to be truncated).
true
if and only if this is either a real (compact) or ideal (non-compact) triangulation of the solid torus.
|
inlineinherited |
Determines if this triangulation is standard.
This is the case if and only if every vertex is standard. See NVertex::isStandard() for further details.
true
if and only if this triangulation is standard.
|
inherited |
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.
true
if and only if this is a 3-sphere triangulation.
|
inlineinherited |
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 false
).
true
if and only if this triangulation is valid.
|
inherited |
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.
true
if and only if this triangulation is 0-efficient.
|
static |
Returns whether or not the SnapPea kernel writes diagnostic messages to standard output.
By default such diagnostic messages are disabled. To enable them, call enableKernelMessages().
This routine (which interacts with static data) is thread-safe.
true
if and only if diagonstic messages are enabled.
|
inherited |
Is it already known (or trivial to determine) whether or not this is a triangulation of a 3-dimensional ball? See isBall() for further details.
If this property is indeed already known, future calls to isBall() 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 false
as the precalculated value for isBall() and this routine will return true
.
Otherwise a call to isBall() may potentially require more significant work, and so this routine will return false
.
true
if and only if this property is already known or trivial to calculate.
|
inherited |
Is it already known (or trivial to determine) whether or not the underlying 3-manifold contains a compressing disc? See hasCompressingDisc() for further details.
If this property is indeed already known, future calls to hasCompressingDisc() 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 false
as the precalculated value for hasCompressingDisc() and this routine will return true
.
Otherwise a call to hasCompressingDisc() may potentially require more significant work, and so this routine will return false
.
true
if and only if this property is already known or trivial to calculate.
|
inherited |
Is it already known (or trivial to determine) whether or not the underlying 3-manifold is Haken? See isHaken() for further details.
If this property is indeed already known, future calls to isHaken() will be very fast (simply returning the precalculated value).
true
if and only if this property is already known or trivial to calculate.
|
inherited |
Is it already known (or trivial to determine) whether or not the underlying 3-manifold is irreducible? See isIrreducible() for further details.
If this property is indeed already known, future calls to isIrreducible() will be very fast (simply returning the precalculated value).
true
if and only if this property is already known or trivial to calculate.
|
inherited |
Is it already known (or trivial to determine) whether or not this is a triangulation of a solid torus (that is, the unknot complement)? See isSolidTorus() for further details.
If this property is indeed already known, future calls to isSolidTorus() 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 false
as the precalculated value for isSolidTorus() and this routine will return true
.
Otherwise a call to isSolidTorus() may potentially require more significant work, and so this routine will return false
.
true
if and only if this property is already known or trivial to calculate.
|
inlineinherited |
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).
true
if and only if this property is already known.
|
inherited |
Is it already known (or trivial to determine) whether or not this triangulation supports a strict angle structure? See hasStrictAngleStructure() for further details.
If this property is indeed already known, future calls to findStrictAngleStructure() and hasStrictAngleStructure() will be very fast (simply returning the precalculated solution).
true
if and only if this property is already known or trivial to calculate.
|
inherited |
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 false
as the precalculated value for isThreeSphere() and this routine will return true
.
Otherwise a call to isThreeSphere() may potentially require more significant work, and so this routine will return false
.
true
if and only if this property is already known or trivial to calculate.
|
inlineinherited |
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).
true
if and only if this property is already known.
|
inherited |
Performs a layering upon the given boundary edge of the triangulation.
See the NLayering class notes for further details on what a layering entails.
edge | the boundary edge upon which to layer. |
|
inherited |
Counts the number of levels between this packet and its given descendant in the tree structure.
If descendant
is this packet, the number of levels is zero.
descendant
, or can be obtained from descendant
using only child-to-parent steps.descendant | the packet whose relationship with this packet we are examining. |
|
inlineinherited |
Counts the number of levels between this packet and its given ancestor in the tree structure.
If ancestor
is this packet, the number of levels is zero.
ancestor
, or can be obtained from ancestor
using only parent-to-child steps.ancestor | the packet whose relationship with this packet we are examining. |
|
inherited |
Registers the given packet listener to listen for events on this packet.
See the NPacketListener class notes for details.
listener | the listener to register. |
true
if the given listener was successfully registered, or false
if the given listener was already registered beforehand.
|
inherited |
Relabel the top-dimensional simplices and their vertices so that this triangulation is in canonical form.
This is essentially the lexicographically smallest labelling when the facet gluings are written out in order.
Two triangulations are isomorphic if and only if their canonical forms are identical.
The lexicographic ordering assumes that the facet gluings are written in order of simplex index and then facet number. Each gluing is written as the destination simplex index followed by the gluing permutation (which in turn is written as the images of 0,1,...,dim in order).
true
if the triangulation was changed, or false
if the triangulation was in canonical form to begin with.
|
inherited |
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.
|
inherited |
Cuts this packet away from its parent in the tree structure and instead makes it matriarch of its own tree.
The tree information for both this packet and its parent will be updated.
This routine takes small constant time.
|
inherited |
Returns a new label that cannot be found anywhere in the entire tree structure.
This packet need not be the tree matriarch; this routine will search the entire tree to which this packet belongs.
The new label will consist of the given base, possibly followed by a space and a number.
base | a string upon which the new label will be based. |
|
inherited |
Ensures that all packet labels in both this and the given packet tree combined are distinct.
If two packets have the same label, one will be renamed by adding a space and a number.
Packets in the given packet tree will be given priority over the labels; that is, if a packet in this tree has the same label as a packet in the given tree, it will be the packet in this tree that is renamed.
The given packet tree may be null
, in which case only this tree will be examined.
reference | the packet tree with which to compare this tree. |
true
if and only if any of the packets were relabelled.
|
inherited |
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.
|
inherited |
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 vertexSet
.
Note that the edge and vertex pointers returned will become invalid once the triangulation has changed.
edgeSet | the set to be emptied and into which the edges of the maximal forest will be placed. |
vertexSet | the set to be emptied and into which the vertices of the maximal forest will be placed. |
|
inherited |
Produces a maximal forest in the triangulation's dual 1-skeleton.
The given set will be emptied and will have the triangles corresponding to the edges of the maximal forest in the dual 1-skeleton placed into it.
Note that the triangle pointers returned will become invalid once the triangulation has changed.
triangleSet | the set to be emptied and into which the triangles representing the maximal forest will be placed. |
|
inherited |
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.
edgeSet | the set to be emptied and into which the edges of the maximal forest will be placed. |
canJoinBoundaries | true if and only if different boundary components are allowed to be joined by the maximal forest. |
double regina::NSnapPeaTriangulation::minImaginaryShape | ( | ) | const |
Returns the minimum imaginary part found amongst all tetrahedron shapes, with respect to the Dehn filled hyperbolic structure.
Tetrahedron shapes are given in rectangular form using a fixed coordinate system, as described in the documentation for shape().
If this is a null triangulation, or if solutionType() is no_solution or not_attempted (i.e., we did not or could not solve for a hyperbolic structure), then this routine will simply return zero.
Manifold.tetrahedra_shapes(part='rect')
.
|
inherited |
Moves the contents of this triangulation into the given destination triangulation, without destroying any pre-existing contents.
That is, all tetrahedra that currently belong to dest will remain there, and all tetrahedra that belong to this triangulation will be moved across as additional tetrahedra in dest.
All NTetrahedron pointers or references will remain valid. After this operation, this triangulation will be empty.
dest | the triangulation to which tetrahedra should be moved. |
|
inherited |
Moves this packet the given number of steps towards the end of its sibling list.
If the number of steps is larger than the greatest possible movement, the packet will be moved to the very end of its sibling list.
This routine takes time proportional to the number of steps.
|
inherited |
Moves this packet to be the first in its sibling list.
This routine takes small constant time.
|
inherited |
Moves this packet to be the last in its sibling list.
This routine takes small constant time.
|
inherited |
Moves this packet the given number of steps towards the beginning of its sibling list.
If the number of steps is larger than the greatest possible movement, the packet will be moved to the very beginning of its sibling list.
This routine takes time proportional to the number of steps.
std::string regina::NSnapPeaTriangulation::name | ( | ) | const |
Returns SnapPea's internal name for this triangulation.
This is the manifold name stored in the SnapPea kernel, which is typically different from the packet label assigned by Regina.
If this is a null triangulation then the empty string will be returned.
Manifold.name()
.
|
inlineinherited |
A dimension-agnostic alias for newTetrahedron().
This is to assist with writing dimension-agnostic code that can be reused to work in different dimensions.
Here "simplex" refers to a top-dimensional simplex (which for 3-manifold triangulations means a tetrahedron).
See newTetrahedron() for further information.
|
inlineinherited |
A dimension-agnostic alias for newTetrahedron().
This is to assist with writing dimension-agnostic code that can be reused to work in different dimensions.
Here "simplex" refers to a top-dimensional simplex (which for 3-manifold triangulations means a tetrahedron).
See newTetrahedron() for further information.
|
inlineinherited |
Creates a new tetrahedron and adds it to this triangulation.
The new tetrahedron will have an empty description. All four faces of the new tetrahedron will be boundary triangles.
The new tetrahedron will become the last tetrahedron in this triangulation.
|
inlineinherited |
Creates a new tetrahedron with the given description and adds it to this triangulation.
All four faces of the new tetrahedron will be boundary triangles.
desc | the description to assign to the new tetrahedron. |
|
inherited |
Finds the next packet after this in a complete depth-first iteration of the entire tree structure to which this packet belongs.
Note that this packet need not be the tree matriarch.
A parent packet is always reached before its children. The tree matriarch will be the first packet visited in a complete depth-first iteration.
|
inherited |
Finds the next packet after this in a complete depth-first iteration of the entire tree structure to which this packet belongs.
Note that this packet need not be the tree matriarch.
A parent packet is always reached before its children. The tree matriarch will be the first packet visited in a complete depth-first iteration.
|
inherited |
Finds the next packet after this of the requested type in a complete depth-first iteration of the entire tree structure.
Note that this packet need not be the tree matriarch. The order of tree searching is described in firstTreePacket().
type | the type of packet to search for, as returned by getPacketTypeName(). Note that string comparisons are case sensitive. |
|
inherited |
Finds the next packet after this of the requested type in a complete depth-first iteration of the entire tree structure.
Note that this packet need not be the tree matriarch. The order of tree searching is described in firstTreePacket().
type | the type of packet to search for, as returned by getPacketTypeName(). Note that string comparisons are case sensitive. |
|
inherited |
Checks the eligibility of and/or performs a 1-4 move upon the given tetrahedron.
This involves replacing one tetrahedron with four tetrahedra: each new tetrahedron runs from one face of the original tetrahedron to a new common internal degree four vertex.
This move can always be performed. The check argument is present (as for other moves), but is simply ignored (since the move is always legal). The perform argument is also present for consistency with other moves, but if it is set to false
then this routine does nothing and returns no useful information.
Note that after performing this move, all skeletal objects (edges, components, etc.) will be reconstructed, which means any pointers to old skeletal objects (such as the argument t) can no longer be used.
t | the tetrahedron about which to perform the move. |
check | this argument is ignored, since this move is always legal (see the notes above). |
perform | true if we are to perform the move (defaults to true ). |
true
always.
|
inherited |
Checks the eligibility of and/or performs a book opening move about the given triangle.
This involves taking a triangle meeting the boundary along two edges, and ungluing it to create two new boundary triangles (thus exposing the tetrahedra it initially joined). This move is the inverse of the closeBook() move, and is used to open the way for new shellBoundary() moves.
This move can be done if:
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 (triangles, components, etc.) will be reconstructed, which means any pointers to old skeletal objects (such as the argument f) can no longer be used.
t | the triangle about which to perform the move. |
check | true if we are to check whether the move is allowed (defaults to true ). |
perform | true if we are to perform the move (defaults to true ). |
true
, the function returns true
if and only if the requested move may be performed without changing the topology of the manifold. If check is false
, the function simply returns true
.
|
inherited |
Relabels tetrahedron vertices in this triangulation to give an ordered triangulation, if possible.
To be an ordered triangulation, all face gluings (when restricted to the tetrahedron face) must be order preserving. In other words, it must be possible to orient all edges of the triangulation in such a fashion that they are consistent with the ordering of the vertices in each tetrahedron.
If it is possible to order this triangulation, the vertices of each tetrahedron will be relabelled accordingly and this routine will return true
. Otherwise, this routine will return false
and the triangulation will not be changed.
forceOriented | true if the triangulation must be both ordered and oriented, in which case this routine will return false if the triangulation cannot be oriented and ordered at the same time. See orient() for further details. |
true
if the triangulation has been successfully ordered as described above, or false
if not.
|
inherited |
Relabels tetrahedron vertices in this triangulation so that all tetrahedra are oriented consistently, if possible.
This routine works by flipping vertices 2 and 3 of each tetrahedron with negative orientation. The result will be a triangulation where the tetrahedron vertices are labelled in a way that preserves orientation across adjacent tetrahedron faces. In particular, every gluing permutation will have negative sign.
If this triangulation includes both orientable and non-orientable components, the orientable components will be oriented as described above and the non-orientable components will be left untouched.
|
inlinevirtualinherited |
Called before the contents of the packet are to be changed.
Once the contents are changed, packetWasChanged() will be called also.
The default implementation of this routine is to do nothing.
packet | the packet being listened to. |
|
inlinevirtualinherited |
Called before the packet is about to be destroyed.
Note that there is no matching function called after the packet is destroyed, since the set of listeners will no longer be available at that stage.
When an entire packet subtree is to be destroyed, child packets will notify their listeners of the impending destruction before parent packets will.
Note that the packet will forcibly unregister this listener immediately before packetToBeDestroyed() is called, to avoid any unpleasant consequences if this listener should also try to unregister itself. This means that, by the time this routine is called, this listener will no longer be registered with the packet in question (and any attempt to unregister it again will be harmless).
The default implementation of this routine is to do nothing.
packet | the packet being listened to. |
Reimplemented in regina::NScript.
|
inlinevirtualinherited |
Called before the packet label or tags are to be changed.
Once the label or tags are changed, packetWasRenamed() will be called also.
The default implementation of this routine is to do nothing.
packet | the packet being listened to. |
|
virtual |
Called after the contents of the packet have been changed.
Before the contents are changed, packetToBeChanged() will be called also.
The default implementation of this routine is to do nothing.
packet | the packet being listened to. |
Reimplemented from regina::NPacketListener.
|
inlinevirtualinherited |
Called after the packet label or tags have been changed.
Before the label or tags are changed, packetToBeRenamed() will be called also.
The default implementation of this routine is to do nothing.
packet | the packet being listened to. |
Reimplemented in regina::NScript.
|
inline |
A synonym for protoCanonize(), which constructs the canonical cell decomposition using an arbitrary retriangulation if necessary.
See canonize() for further details.
NSnapPeaTriangulation* regina::NSnapPeaTriangulation::protoCanonize | ( | ) | const |
Constructs the canonical cell decomposition, using an arbitrary retriangulation if this decomposition contains non-tetrahedron cells.
Any fillings on the cusps of this SnapPea triangulation will be ignored for the purposes of canonisation, though they will be copied over to the new SnapPea triangulation that is returned.
The canonical cell decomposition is the one described in "Convex hulls and isometries of cusped hyperbolic 3-manifolds", Jeffrey R. Weeks, Topology Appl. 52 (1993), 127-149.
If the canonical cell decomposition is already a triangulation then we leave it untouched, and otherwise we triangulate it arbitrarily. Either way, we preserve the hyperbolic structure.
If you need a canonical triangulation (as opposed to an arbitrary retriangulation), then you should call canonize() instead.
The resulting triangulation will be newly allocated, and it is the responsibility of the caller of this routine to destroy it.
If for any reason either Regina or SnapPea are unable to construct a triangulation of the canonical cell decomposition, then this routine will return 0.
canonize()
means different things for SnapPy versus the SnapPea kernel. Here Regina follows the naming convention used in the SnapPea kernel. Specifically: Regina's routine NSnapPeaTriangulation::protoCanonize() corresponds to SnapPy's Manifold.canonize()
and the SnapPea kernel's proto_canonize(manifold)
. Regina's routine NSnapPeaTriangulation::canonize() corresponds to the SnapPea kernel's canonize(manifold)
, and is not available through SnapPy at all.
|
inherited |
Punctures this manifold by removing a 3-ball from the interior of the given tetrahedron.
If no tetrahedron is specified (i.e., the tetrahedron pointer is null
), then the puncture will be taken from the interior of tetrahedron 0.
The puncture will not meet the boundary of the tetrahedron, so nothing will go wrong if the tetrahedron has boundary facets and/or ideal vertices. A side-effect of this, however, is that the resulting triangulation will contain additional vertices, and will almost certainly be far from minimal. It is highly recommended that you run intelligentSimplify() if you do not need to preserve the combinatorial structure of the new triangulation.
The puncturing is done by subdividing the original tetrahedron. The new tetrahedra will have orientations consistent with the original tetrahedra, so if the triangulation was originally oriented then it will also be oriented after this routine has been called. See isOriented() for further details on oriented triangulations.
The new sphere boundary will be formed from two triangles; specifically, face 0 of the last and second-last tetrahedra of the triangulation. These two triangles will be joined so that vertex 1 of each tetrahedron coincides, and vertices 2,3 of one map to vertices 3,2 of the other.
tet
is non-null then it is in fact a tetrahedron of this triangulation.tet | the tetrahedron inside which the puncture will be taken. This may be null (the default), in which case the first tetrahedron will be used. |
|
inline |
A synonym for randomize(), which asks SnapPea to randomly retriangulate this manifold.
See randomize() for further details.
void regina::NSnapPeaTriangulation::randomize | ( | ) |
Asks SnapPea to randomly retriangulate this manifold, using local moves that preserve the topology.
This can help when SnapPea is having difficulty finding a hyperbolic structure.
This routine uses SnapPea's own internal retriangulation code.
After randomizing, this routine will immediately ask SnapPea to try to find a hyperbolic structure.
If this is a null SnapPea triangulation, this routine does nothing.
Manifold.randomize()
.
|
inherited |
Returns a string that expresses this triangulation in Matveev's 3-manifold recogniser format.
|
inherited |
Writes a string expressing this triangulation in Matveev's 3-manifold recogniser format to the given output stream.
out | the output stream to which the recogniser data file will be written. |
|
inherited |
A synonym for recogniser().
This returns a string that expresses this triangulation in Matveev's 3-manifold recogniser format.
|
inlineinherited |
A synonym for recognizer(std::ostream&).
This writes a string expressing this triangulation in Matveev's 3-manifold recogniser format to the given output stream.
out | the output stream to which the recogniser data file will be written. |
|
staticinherited |
Rehydrates the given alphabetical string into a new triangulation.
See dehydrate() for more information on dehydration strings.
This routine will rehydrate the given string into a new triangulation, and return this new triangulation.
The converse routine dehydrate() can be used to extract a dehydration string from an existing triangulation. Dehydration followed by rehydration might not produce a triangulation identical to the original, but it is guaranteed to produce an isomorphic copy. See dehydrate() for the reasons behind this.
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.
dehydration | a dehydrated representation of the triangulation to construct. Case is irrelevant; all letters will be treated as if they were lower case. |
|
inlineinherited |
A dimension-agnostic alias for removeAllTetrahedra().
This is to assist with writing dimension-agnostic code that can be reused to work in different dimensions.
Here "simplex" refers to a top-dimensional simplex (which for 3-manifold triangulations means a tetrahedron).
See removeAllTetrahedra() for further information.
|
inherited |
Removes all associated tags from this packet.
Each packet can have an arbitrary set of string tags associated with it. The tags are not used by this calculation engine; the feature is provided for whatever use a developer or user chooses to make of it.
Tags are case-sensitive. Tags associated with a single packet must be distinct, i.e., a particular tag cannot be associated more than once with the same packet.
|
inlineinherited |
Removes all tetrahedra from the triangulation.
All tetrahedra will be deallocated.
|
inlineinherited |
A dimension-agnostic alias for removeTetrahedron().
This is to assist with writing dimension-agnostic code that can be reused to work in different dimensions.
Here "simplex" refers to a top-dimensional simplex (which for 3-manifold triangulations means a tetrahedron).
See removeTetrahedron() for further information.
|
inlineinherited |
A dimension-agnostic alias for removeTetrahedronAt().
This is to assist with writing dimension-agnostic code that can be reused to work in different dimensions.
Here "simplex" refers to a top-dimensional simplex (which for 3-manifold triangulations means a tetrahedron).
See removeTetrahedronAt() for further information.
|
inherited |
Removes the association of the given tag with this packet.
Each packet can have an arbitrary set of string tags associated with it. The tags are not used by this calculation engine; the feature is provided for whatever use a developer or user chooses to make of it.
Tags are case-sensitive. Tags associated with a single packet must be distinct, i.e., a particular tag cannot be associated more than once with the same packet.
tag | the tag to remove. |
true
if the given tag was removed, or false
if the given tag was not actually associated with this packet.
|
inlineinherited |
Removes the given tetrahedron from the triangulation.
All faces glued to this tetrahedron will be unglued. The tetrahedron will be deallocated.
tet | the tetrahedron to remove. |
|
inlineinherited |
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 be deallocated.
index | specifies which tetrahedron to remove; this should be between 0 and getNumberOfTetrahedra()-1 inclusive. |
|
inherited |
Reorders the tetrahedra of this triangulation using a breadth-first search, so that small-numbered tetrahedra are adjacent to other small-numbered tetrahedra.
Specifically, the reordering will operate as follows. Tetrahedron 0 will remain tetrahedron 0. Its immediate neighbours will be numbered 1, 2, 3 and 4 (though if these neighbours are not distinct then of course fewer labels will be required). Their immediate neighbours will in turn be numbered 5, 6, and so on, ultimately following a breadth-first search throughout the entire triangulation.
If the optional argument reverse is true
, then tetrahedron numbers will be assigned in reverse order. That is, tetrahedron 0 will become tetrahedron n-1, its neighbours will become tetrahedra n-2 down to n-5, and so on.
reverse | true if the new tetrahedron numbers should be assigned in reverse order, as described above. |
|
inherited |
Cuts this packet away from its parent in the tree structure, and inserts it as a child of the given packet instead.
This routine is essentially a combination of makeOrphan() followed by either insertChildFirst() or insertChildLast().
This routine takes small constant time. It is safe to use regardless of whether this packet has a parent or not.
newParent | the new parent of this packet, i.e., the packet beneath which this packet will be inserted. |
first | true if this packet should be inserted as the first child of the given parent, or false (the default) if it should be inserted as the last child. |
|
inherited |
Saves the subtree rooted at this packet to the given Regina data file, using Regina's native XML file format.
The XML file may be optionally compressed (Regina can happily read both compressed and uncompressed XML).
This is the preferred way of saving a Regina data file. Typically this will be called from the root of the packet tree, which will save the entire packet tree to file.
filename | the pathname of the file to write to. |
compressed | true if the XML data should be compressed, or false if it should be written as plain text. |
true
if and only if the file was successfully written. void regina::NSnapPeaTriangulation::saveAsSnapPea | ( | const char * | filename | ) | const |
Deprecated routine that saves the underlying triangulation as a native SnapPea data file.
|
inherited |
Writes this triangulation to the given file in Matveev's 3-manifold recogniser format.
filename | the name of the Recogniser file to which to write. |
true
if and only if the file was successfully written.
|
inlineinherited |
A synonym for saveRecogniser().
This writes this triangulation to the given file in Matveev's 3-manifold recogniser format.
filename | the name of the Recogniser file to which to write. |
true
if and only if the file was successfully written.
|
virtual |
Writes this triangulation to the given file using SnapPea's native file format.
Regarding what gets stored in the SnapPea data file:
If this triangulation is empty, invalid, or contains boundary triangles (which SnapPea cannot represent), then the file will not be written and this routine will return false
.
filename | the name of the SnapPea file to which to write. |
true
if and only if the file was successfully written. Reimplemented from regina::NTriangulation.
|
inherited |
Sets the label associated with this individual packet.
newLabel | the new label to give this packet. |
|
inline |
Returns the shape of the given tetrahedron, with respect to the Dehn filled hyperbolic structure.
Tetrahedron shapes are given in rectangular form, and using a fixed coordinate system (fixed alignment, in SnapPea's terminology).
If this is a null triangulation, or if solutionType() is no_solution or not_attempted (i.e., we did not or could not solve for a hyperbolic structure), then this routine will simply return zero.
This routine is fast constant time (unlike in SnapPea, where the corresponding routine get_tet_shape takes linear time). Therefore you can happily call this routine repeatedly without a significant performance penalty.
Manifold.tetrahedra_shapes(part='rect')[tet]
.tet | the index of a tetrahedron; this must be between 0 and getNumberOfTetrahedra()-1 inclusive. |
|
inherited |
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 if:
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 (triangles, components, etc.) will be reconstructed, which means any pointers to old skeletal objects can no longer be used.
t | the tetrahedron upon which to perform the move. |
check | true if we are to check whether the move is allowed (defaults to true ). |
perform | true if we are to perform the move (defaults to true ). |
true
, the function returns true
if and only if the requested move may be performed without changing the topology of the manifold. If check is false
, the function simply returns true
.
|
inlineinherited |
A dimension-agnostic alias for tetrahedronIndex().
This is to assist with writing dimension-agnostic code that can be reused to work in different dimensions.
Here "simplex" refers to a top-dimensional simplex (which for 3-manifold triangulations means a tetrahedron).
See tetrahedronIndex() for further information.
|
inlineinherited |
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.
newGroup | a new (and hopefully simpler) presentation of the fundamental group of this triangulation. |
|
inherited |
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 moves that do not reduce the number of tetrahedra (such as 4-4 moves or book opening moves) are not used in this routine. Such moves do however feature in intelligentSimplify().
perform | true if we are to perform the simplifications, or false if we are only to investigate whether simplifications are possible (defaults to true ). |
true
, this routine returns true
if and only if the triangulation was changed to reduce the number of tetrahedra; if perform is false
, this routine returns true
if and only if it determines that it is capable of performing such a change. NMatrixInt* regina::NSnapPeaTriangulation::slopeEquations | ( | ) | const |
Returns a matrix for computing boundary slopes of spun-normal surfaces at the cusps of the triangulation.
This matrix includes a pair of rows for each cusp in the triangulation: one row for determining the algebraic intersection number with the meridian, followed by one row for determining the algebraic intersection number with the longitude.
If the triangulation has more than one cusp, these pairs are ordered by cusp index (as stored by SnapPea). You can examine cusp(cusp_number).vertex()
to map these to Regina's vertex indices if needed.
For the purposes of this routine, any fillings on the cusps of this SnapPea triangulation will be ignored.
This matrix is constructed so that, if M and L are the rows for the meridian and longitude at some cusp, then for any spun-normal surface with quadrilateral coordinates q, the boundary curves have algebraic intersection number M.q with the meridian and L.q with the longitude. Equivalently, the boundary curves pass L.q times around the meridian and -M.q times around the longitude. To compute these slopes directly from a normal surface, see NNormalSurface::boundaryIntersections().
The orientations of the boundary curves of a spun-normal surface are chosen so that if meridian and longitude are a positive basis as vieved from the cusp, then as one travels along an oriented boundary curve, the spun-normal surface spirals into the cusp to one's right and down into the manifold to one's left.
|
virtual |
Returns a string containing the full contents of a SnapPea data file that describes this triangulation.
In particular, this string can be used in a Python session to pass the triangulation directly to SnapPy (without writing to the filesystem).
Regarding what gets stored in the SnapPea data file:
If you wish to export a triangulation to a SnapPea file, you should call saveSnapPea() instead (which has better performance, and does not require you to construct an enormous intermediate string).
If this triangulation is empty, invalid, or contains boundary triangles (which SnapPea cannot represent), then the resulting string will be empty.
Reimplemented from regina::NTriangulation.
|
virtual |
Writes the full contents of a SnapPea data file describing this triangulation to the given output stream.
Regarding what gets stored in the SnapPea data file:
If you wish to extract the SnapPea data file as a string, you should call the zero-argument routine snapPea() instead. If you wish to write to a real SnapPea data file on the filesystem, you should call saveSnapPea() (which is also available in Python).
If this triangulation is empty, invalid, or contains boundary triangles (which SnapPea cannot represent), then nothing will be written to the output stream.
out | the output stream to which the SnapPea data file will be written. |
Reimplemented from regina::NTriangulation.
SolutionType regina::NSnapPeaTriangulation::solutionType | ( | ) | const |
Returns the type of solution found when solving for a hyperbolic structure, with respect to the current Dehn filling (if any).
Manifold.solution_type()
.
|
inherited |
Sorts the immediate children of this packet according to their packet labels.
Note that this routine is not recursive (for instance, grandchildren will not be sorted within each child packet).
This routine takes quadratic time in the number of immediate children (and it's slow quadratic at that).
|
inherited |
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.
componentParent | the packet beneath which the new component triangulations will be inserted, or 0 if they should be inserted directly beneath this triangulation. |
setLabels | true if the new component triangulations should be assigned unique packet labels, or false if they should be left without labels at all. |
|
inherited |
Returns the output from writeTextShort() as a string.
__str__()
function.
|
inherited |
Swaps the contents of this and the given triangulation.
That is, all tetrahedra that belong to this triangulation will be moved to other, and all tetrahedra that belong to other will be moved to this triangulation.
All NTetrahedron pointers or references will remain valid.
other | the triangulation whose contents should be swapped with this. |
|
inherited |
Swaps this packet with its next sibling in the sequence of children beneath their common parent packet.
Calling this routine is equivalent to calling moveDown().
This routine takes small constant time.
If this packet has no next sibling then this routine does nothing.
|
inlineinherited |
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.
This routine was introduced in Regina 4.5, and replaces the old getTetrahedronIndex(). The name has been changed because, unlike the old routine, it requires that the given tetrahedron belongs to the triangulation (a consequence of some significant memory optimisations).
tet | specifies which tetrahedron to find in the triangulation. |
|
inherited |
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 triangle. This can be done iff (i) the edge is valid and non-boundary, and (ii) 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 (triangles, components, etc.) will be reconstructed, which means any pointers to old skeletal objects (such as the argument e) can no longer be used.
e | the edge about which to perform the move. |
check | true if we are to check whether the move is allowed (defaults to true ). |
perform | true if we are to perform the move (defaults to true ). |
true
, the function returns true
if and only if the requested move may be performed without changing the topology of the manifold. If check is false
, the function simply returns true
. NTriangulation* regina::NSnapPeaTriangulation::toRegina | ( | ) | const |
Deprecated routine to create a new Regina triangulation that mirrors the internal SnapPea structure.
Any fillings on the cusps will be ignored.
The resulting triangulation will be newly created, and it is the responsibility of the caller of this routine to eventually delete it. The packet label of the new triangulation will be the internal SnapPea manifold name, as returned by name().
|
inlineinherited |
A deprecated alias for str(), which returns the output from writeTextShort() as a string.
|
inlineinherited |
A deprecated alias for detail(), which returns the output from writeTextLong() as a string.
|
inlineinherited |
Returns the index of the given triangle in the triangulation.
This routine was introduced in Regina 4.5, and replaces the old getFaceIndex(). The name has been changed because, unlike the old routine, it requires that the given triangle belongs to the triangulation (a consequence of some significant memory optimisations).
triangle | specifies which triangle to find in the triangulation. |
|
inherited |
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.
These invariants, although computed in the complex field, should all be reals. Thus the return type is an ordinary double.
r | the integer r as described above; this must be at least 3. |
whichRoot | determines q0 to be the root of unity e^(2i * Pi * whichRoot / 2r); this argument must be strictly between 0 and 2r and must have no common factors with r. |
|
inherited |
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:
e
to the vertex of the second tetrahedron not touching the original tetrahedron. These edges must be distinct and may not both be in the boundary.There are additional "distinct and not both boundary" conditions on faces of the second tetrahedron, but those follow automatically from the final condition above.
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 (triangles, components, etc.) will be reconstructed, which means any pointers to old skeletal objects (such as the argument e) can no longer be used.
e | the edge about which to perform the move. |
edgeEnd | the end of the edge opposite that at which the second tetrahedron (to be merged) is joined. The end is 0 or 1, corresponding to the labelling (0,1) of the vertices of the edge as described in NEdgeEmbedding::getVertices(). |
check | true if we are to check whether the move is allowed (defaults to true ). |
perform | true if we are to perform the move (defaults to true ). |
true
, the function returns true
if and only if the requested move may be performed without changing the topology of the manifold. If check is false
, the function simply returns true
.
|
inherited |
Checks the eligibility of and/or performs a 2-3 move about the given triangle.
This involves replacing the two tetrahedra joined at that triangle 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 (triangles, components, etc.) will be reconstructed, which means any pointers to old skeletal objects (such as the argument f) can no longer be used.
t | the triangle about which to perform the move. |
check | true if we are to check whether the move is allowed (defaults to true ). |
perform | true if we are to perform the move (defaults to true ). |
true
, the function returns true
if and only if the requested move may be performed without changing the topology of the manifold. If check is false
, the function simply returns true
.
|
inherited |
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 if:
e
in each tetrahedron are distinct and not both boundary;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 (triangles, components, etc.) will be reconstructed, which means any pointers to old skeletal objects (such as the argument e) can no longer be used.
e | the edge about which to perform the move. |
check | true if we are to check whether the move is allowed (defaults to true ). |
perform | true if we are to perform the move (defaults to true ). |
true
, the function returns true
if and only if the requested move may be performed without changing the topology of the manifold. If check is false
, the function simply returns true
.
|
inherited |
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 if:
v
in each tetrahedron are distinct and not both boundary;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 (triangles, components, etc.) will be reconstructed, which means any pointers to old skeletal objects (such as the argument v) can no longer be used.
v | the vertex about which to perform the move. |
check | true if we are to check whether the move is allowed (defaults to true ). |
perform | true if we are to perform the move (defaults to true ). |
true
, the function returns true
if and only if the requested move may be performed without changing the topology of the manifold. If check is false
, the function simply returns true
. void regina::NSnapPeaTriangulation::unfill | ( | unsigned | whichCusp = 0 | ) |
Removes any filling on the given cusp.
After removing the filling, this routine will automatically ask SnapPea to update the hyperbolic structure.
If the given cusp is already complete, then this routine safely does nothing.
whichCusp | the index of the cusp to unfill according to SnapPea; this must be between 0 and countCusps()-1 inclusive. |
|
inherited |
Unregisters the given packet listener so that it no longer listens for events on this packet.
See the NPacketListener class notes for details.
listener | the listener to unregister. |
true
if the given listener was successfully unregistered, or false
if the given listener was not registered in the first place.
|
inherited |
Unregisters this listener from any packets to which it is currently listening.
bool regina::NSnapPeaTriangulation::verifyTriangulation | ( | const NTriangulation & | triangulation | ) | const |
Deprecated routine that verifies whether the tetrahedron face gluings from this SnapPea triangulation match the given Regina triangulation precisely.
Any fillings on the cusps of this SnapPea triangulation will be ignored.
This is useful if you need to test whether SnapPea has relabelled and/or retriangulated.
|
inlineinherited |
Returns the index of the given vertex in the triangulation.
This routine was introduced in Regina 4.5, and replaces the old getVertexIndex(). The name has been changed because, unlike the old routine, it requires that the given vertex belongs to the triangulation (a consequence of some significant memory optimisations).
vertex | specifies which vertex to find in the triangulation. |
double regina::NSnapPeaTriangulation::volume | ( | ) | const |
Computes the volume of the current solution to the hyperbolic gluing equations.
This will be with respect to the current Dehn filling (if any).
Manifold.volume()
.double regina::NSnapPeaTriangulation::volume | ( | int & | precision | ) | const |
Computes the volume of the current solution to the hyperbolic gluing equations, and estimates the accuracy of the answer.
This will be with respect to the current Dehn filling (if any).
Manifold.volume(accuracy=True)
.precision | used to return an estimate of the number of decimal places of accuracy in the calculated volume. |
bool regina::NSnapPeaTriangulation::volumeZero | ( | ) | const |
Determines whether the current solution to the gluing equations has volume approximately zero.
This test is not rigorous.
This requires (i) the volume itself to be very close to zero in an absolute sense, (ii) the volume to be zero within SnapPea's own estimated precision, and (iii) SnapPea's estimated precision to be sufficiently good in an absolute sense.
true
if and only if the volume of the current solution is approximately zero according to the constraints outlined above.
|
virtual |
Writes this object in long text format to the given output stream.
The output should provide the user with all the information they could want. The output should be human-readable, should not contain extremely long lines (so users can read the output in a terminal), and should end with a final newline.
The default implementation of this routine merely calls writeTextShort() and adds a newline.
out | the output stream to which to write. |
Reimplemented from regina::NTriangulation.
|
virtual |
Writes this object in short text format to the given output stream.
The output should be human-readable, should fit on a single line, and should not end with a newline.
out | the output stream to which to write. |
Reimplemented from regina::NTriangulation.
|
inherited |
Writes the subtree rooted at this packet to the given output stream in Regina's native XML file format.
Ths is similar to calling save(), except that (i) the user has a more flexible choice of output stream, and (ii) the XML will always be written in plain text (i.e., it will not be compressed).
If you simply wish to save your data to a file on the filesystem, you should call save() instead.
Typically this will be called from the root of the packet tree, which will write the entire packet tree to the output stream.
The output from this routine cannot be used as a piece of an XML file; it must be the entire XML file. For a piece of an XML file, see routine writeXMLPacketTree() instead.
out | the output stream to which the XML data file should be written. |
|
protectedvirtual |
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.
out | the output stream to which the XML should be written. |
Reimplemented from regina::NTriangulation.
|
protectedinherited |
Writes a chunk of XML containing the subtree with this packet as matriarch.
This is the preferred way of writing a packet tree to file.
The output from this routine is only a piece of XML; it should not be used as a complete XML file. For a complete XML file, see routine writeXMLFile() instead.
out | the output stream to which the XML should be written. |