Regina Calculation Engine
|
Details for implementing triangulations of 4-manifolds. More...
Classes | |
class | regina::Component< 4 > |
Represents a connected component of a 4-manifold triangulation. More... | |
class | regina::Face< 4, 1 > |
Represents an edge in the skeleton of a 4-manifold triangulation. More... | |
class | regina::Face< 4, 4 > |
Represents a pentachoron (a 4-dimensional simplex) within a 4-manifold triangulation. More... | |
class | regina::Triangulation< 4 > |
Represents a 4-dimensional triangulation, typically of a 4-manifold. More... | |
class | regina::Face< 4, 0 > |
Represents a vertex in the skeleton of a 4-manifold triangulation. More... | |
Typedefs | |
typedef BoundaryComponent< 4 > | regina::Dim4BoundaryComponent |
Deprecated typedef for backward compatibility. More... | |
typedef Component< 4 > | regina::Dim4Component |
Deprecated typedef for backward compatibility. More... | |
typedef FaceEmbedding< 4, 1 > | regina::Dim4EdgeEmbedding |
Deprecated typedef for backward compatibility. More... | |
typedef Face< 4, 1 > | regina::Dim4Edge |
Deprecated typedef for backward compatibility. More... | |
typedef Simplex< 4 > | regina::Dim4Pentachoron |
Deprecated typedef for backward compatibility. More... | |
typedef std::vector< Pentachoron< 4 > * >::const_iterator | regina::Triangulation< 4 >::PentachoronIterator |
A dimension-specific alias for SimplexIterator, used to iterate through pentachora. More... | |
typedef FaceList< 4, 3 >::Iterator | regina::Triangulation< 4 >::TetrahedronIterator |
Used to iterate through tetrahedra. More... | |
typedef FaceList< 4, 2 >::Iterator | regina::Triangulation< 4 >::TriangleIterator |
Used to iterate through triangles. More... | |
typedef FaceList< 4, 1 >::Iterator | regina::Triangulation< 4 >::EdgeIterator |
Used to iterate through edges. More... | |
typedef FaceList< 4, 0 >::Iterator | regina::Triangulation< 4 >::VertexIterator |
Used to iterate through vertices. More... | |
typedef Triangulation< 4 > | regina::Dim4Triangulation |
Deprecated typedef for backward compatibility. More... | |
typedef FaceEmbedding< 4, 2 > | regina::Dim4TriangleEmbedding |
Deprecated typedef for backward compatibility. More... | |
typedef FaceEmbedding< 4, 3 > | regina::Dim4TetrahedronEmbedding |
Deprecated typedef for backward compatibility. More... | |
typedef Face< 4, 2 > | regina::Dim4Triangle |
Deprecated typedef for backward compatibility. More... | |
typedef Face< 4, 3 > | regina::Dim4Tetrahedron |
Deprecated typedef for backward compatibility. More... | |
typedef FaceEmbedding< 4, 0 > | regina::Dim4VertexEmbedding |
Deprecated typedef for backward compatibility. More... | |
typedef Face< 4, 0 > | regina::Dim4Vertex |
Deprecated typedef for backward compatibility. More... | |
Functions | |
template<int subdim> | |
size_t | regina::Component< 4 >::countFaces () const |
Returns the number of subdim-faces in this component. More... | |
template<int subdim> | |
const std::vector< Face< 4, subdim > * > & | regina::Component< 4 >::faces () const |
Returns a reference to the list of all subdim-faces in this component. More... | |
template<int subdim> | |
Face< 4, subdim > * | regina::Component< 4 >::face (size_t index) const |
Returns the requested subdim-face in this component. More... | |
bool | regina::Component< 4 >::isIdeal () const |
Determines if this component is ideal. More... | |
bool | regina::Component< 4 >::isClosed () const |
Determines if this component is closed. More... | |
regina::Face< 4, 1 >::~Face () | |
Default destructor. More... | |
const Triangulation< 2 > * | regina::Face< 4, 1 >::buildLink () const |
Returns a full 2-manifold triangulation describing the link of this edge. More... | |
Triangulation< 2 > * | regina::Face< 4, 1 >::buildLinkDetail (bool labels=true, Isomorphism< 4 > **inclusion=0) const |
Returns a full 2-manifold triangulation describing the link of this edge. More... | |
Simplex< 4 > * | regina::Face< 4, 4 >::adjacentPentachoron (int facet) const |
A dimension-specific alias for adjacentSimplex(). More... | |
regina::Face< 4, 0 >::~Face () | |
Default destructor. More... | |
REGINA_INLINE_REQUIRED const Triangulation< 3 > * | regina::Face< 4, 0 >::buildLink () const |
Returns a full 3-manifold triangulation describing the link of this vertex. More... | |
Triangulation< 3 > * | regina::Face< 4, 0 >::buildLinkDetail (bool labels=true, Isomorphism< 4 > **inclusion=0) const |
Returns a full 3-manifold triangulation describing the link of this vertex. More... | |
bool | regina::Face< 4, 0 >::isIdeal () const |
Determines if this vertex is an ideal vertex. More... | |
void | regina::Face< 4, 0 >::writeTextShort (std::ostream &out) const |
Writes a short text representation of this object to the given output stream. More... | |
Friends | |
class | regina::Component< 4 >::Triangulation< 4 > |
class | regina::Component< 4 >::detail::TriangulationBase< 4 > |
Allow access to private members. More... | |
class | regina::Face< 4, 1 >::Triangulation< 4 > |
class | regina::Face< 4, 1 >::detail::TriangulationBase< 4 > |
class | regina::Face< 4, 4 >::Triangulation< 4 > |
class | regina::Face< 4, 4 >::detail::TriangulationBase< 4 > |
Allow access to private members. More... | |
class | regina::Face< 4, 0 >::Triangulation< 4 > |
class | regina::Face< 4, 0 >::detail::TriangulationBase< 4 > |
Subdivisions and Covers | |
class | regina::Face< 4, 4 > |
class | regina::detail::SimplexBase< 4 > |
class | regina::detail::TriangulationBase< 4 > |
class | regina::XMLTriangulationReader< 4 > |
bool | regina::Triangulation< 4 >::idealToFinite () |
Converts an ideal triangulation into a finite triangulation. More... | |
static XMLPacketReader * | regina::Triangulation< 4 >::xmlReader (Packet *parent, XMLTreeResolver &resolver) |
virtual Packet * | regina::Triangulation< 4 >::internalClonePacket (Packet *parent) const override |
Makes a newly allocated copy of this packet. More... | |
virtual void | regina::Triangulation< 4 >::writeXMLPacketData (std::ostream &out) const override |
Writes a chunk of XML containing the data for this packet only. More... | |
Constructors and Destructors | |
regina::Triangulation< 4 >::Triangulation () | |
Default constructor. More... | |
regina::Triangulation< 4 >::Triangulation (const Triangulation ©) | |
Creates a copy of the given triangulation. More... | |
regina::Triangulation< 4 >::Triangulation (const Triangulation ©, bool cloneProps) | |
Creates a new copy of the given triangulation, with the option of whether or not to clone its computed properties also. More... | |
regina::Triangulation< 4 >::Triangulation (const std::string &description) | |
"Magic" constructor that tries to find some way to interpret the given string as a triangulation. More... | |
virtual | regina::Triangulation< 4 >::~Triangulation () |
Destroys this triangulation. More... | |
Packet Administration | |
virtual void | regina::Triangulation< 4 >::writeTextShort (std::ostream &out) const override |
Writes a short text representation of this object to the given output stream. More... | |
virtual void | regina::Triangulation< 4 >::writeTextLong (std::ostream &out) const override |
Writes a detailed text representation of this object to the given output stream. More... | |
virtual bool | regina::Triangulation< 4 >::dependsOnParent () const override |
Determines if this packet depends upon its parent. More... | |
Pentachora | |
Pentachoron< 4 > * | regina::Triangulation< 4 >::newPentachoron () |
A dimension-specific alias for newSimplex(). More... | |
Pentachoron< 4 > * | regina::Triangulation< 4 >::newPentachoron (const std::string &desc) |
A dimension-specific alias for newSimplex(). More... | |
void | regina::Triangulation< 4 >::removePentachoron (Pentachoron< 4 > *tet) |
A dimension-specific alias for removeSimplex(). More... | |
void | regina::Triangulation< 4 >::removePentachoronAt (size_t index) |
A dimension-specific alias for removeSimplexAt(). More... | |
void | regina::Triangulation< 4 >::removeAllPentachora () |
A dimension-specific alias for removeAllSimplices(). More... | |
Basic Properties | |
long | regina::Triangulation< 4 >::eulerCharManifold () const |
Returns the Euler characteristic of the corresponding compact manifold. More... | |
bool | regina::Triangulation< 4 >::isIdeal () const |
Determines if this triangulation is ideal. More... | |
bool | regina::Triangulation< 4 >::isClosed () const |
Determines if this triangulation is closed. More... | |
Algebraic Properties | |
const AbelianGroup & | regina::Triangulation< 4 >::homologyH2 () const |
Returns the second homology group for this triangulation. More... | |
Skeletal Transformations | |
bool | regina::Triangulation< 4 >::intelligentSimplify () |
Attempts to simplify the triangulation as intelligently as possible without further input. More... | |
bool | regina::Triangulation< 4 >::simplifyToLocalMinimum (bool perform=true) |
Uses all known simplification moves to reduce the triangulation monotonically to some local minimum number of pentachora. More... | |
bool | regina::Triangulation< 4 >::simplifyExhaustive (int height=1, unsigned nThreads=1, ProgressTrackerOpen *tracker=0) |
Attempts to simplify this triangulation using a slow but exhaustive search through the Pachner graph. More... | |
template<typename Action , typename... Args> | |
bool | regina::Triangulation< 4 >::retriangulate (int height, unsigned nThreads, ProgressTrackerOpen *tracker, Action &&action, Args &&... args) const |
Explores all triangulations that can be reached from this via Pachner moves, without exceeding a given number of additional pentachora. More... | |
bool | regina::Triangulation< 4 >::fiveOneMove (Vertex< 4 > *v, bool check=true, bool perform=true) |
Deprecated function that checks the eligibility of and/or performs a 5-1 Pachner move upon the given vertex. More... | |
bool | regina::Triangulation< 4 >::fourTwoMove (Edge< 4 > *e, bool check=true, bool perform=true) |
Deprecated function that checks the eligibility of and/or performs a 4-2 move about the given edge. More... | |
bool | regina::Triangulation< 4 >::threeThreeMove (Triangle< 4 > *t, bool check=true, bool perform=true) |
Deprecated function that checks the eligibility of and/or performs a 3-3 move about the given triangle. More... | |
bool | regina::Triangulation< 4 >::twoFourMove (Tetrahedron< 4 > *f, bool check=true, bool perform=true) |
Deprecated function that checks the eligibility of and/or performs a 2-4 move about the given facet. More... | |
bool | regina::Triangulation< 4 >::oneFiveMove (Pentachoron< 4 > *p, bool check=true, bool perform=true) |
Deprecated function that checks the eligibility of and/or performs a 1-5 Pachner move upon the given pentachoron. More... | |
bool | regina::Triangulation< 4 >::twoZeroMove (Triangle< 4 > *t, bool check=true, bool perform=true) |
Checks the eligibility of and/or performs a 2-0 move about the given triangle of degree 2. More... | |
bool | regina::Triangulation< 4 >::twoZeroMove (Edge< 4 > *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 | regina::Triangulation< 4 >::twoZeroMove (Vertex< 4 > *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 | regina::Triangulation< 4 >::openBook (Tetrahedron< 4 > *t, bool check=true, bool perform=true) |
Checks the eligibility of and/or performs a book opening move about the given tetrahedron. More... | |
bool | regina::Triangulation< 4 >::shellBoundary (Pentachoron< 4 > *p, bool check=true, bool perform=true) |
Checks the eligibility of and/or performs a boundary shelling move on the given pentachoron. More... | |
bool | regina::Triangulation< 4 >::collapseEdge (Edge< 4 > *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... | |
Details for implementing triangulations of 4-manifolds.
typedef BoundaryComponent<4> regina::Dim4BoundaryComponent |
Deprecated typedef for backward compatibility.
This typedef will be removed in a future release of Regina.
typedef Component<4> regina::Dim4Component |
Deprecated typedef for backward compatibility.
This typedef will be removed in a future release of Regina.
typedef Face<4, 1> regina::Dim4Edge |
Deprecated typedef for backward compatibility.
This typedef will be removed in a future release of Regina.
typedef FaceEmbedding<4, 1> regina::Dim4EdgeEmbedding |
Deprecated typedef for backward compatibility.
This typedef will be removed in a future release of Regina.
typedef Simplex<4> regina::Dim4Pentachoron |
Deprecated typedef for backward compatibility.
This typedef will be removed in a future release of Regina.
typedef Face<4, 3> regina::Dim4Tetrahedron |
Deprecated typedef for backward compatibility.
This typedef will be removed in a future release of Regina.
typedef FaceEmbedding<4, 3> regina::Dim4TetrahedronEmbedding |
Deprecated typedef for backward compatibility.
This typedef will be removed in a future release of Regina.
typedef Face<4, 2> regina::Dim4Triangle |
Deprecated typedef for backward compatibility.
This typedef will be removed in a future release of Regina.
typedef FaceEmbedding<4, 2> regina::Dim4TriangleEmbedding |
Deprecated typedef for backward compatibility.
This typedef will be removed in a future release of Regina.
typedef Triangulation<4> regina::Dim4Triangulation |
Deprecated typedef for backward compatibility.
This typedef will be removed in a future release of Regina.
typedef Face<4, 0> regina::Dim4Vertex |
Deprecated typedef for backward compatibility.
This typedef will be removed in a future release of Regina.
typedef FaceEmbedding<4, 0> regina::Dim4VertexEmbedding |
Deprecated typedef for backward compatibility.
This typedef will be removed in a future release of Regina.
typedef FaceList<4, 1>::Iterator regina::Triangulation< 4 >::EdgeIterator |
Used to iterate through edges.
typedef std::vector<Pentachoron<4>*>::const_iterator regina::Triangulation< 4 >::PentachoronIterator |
A dimension-specific alias for SimplexIterator, used to iterate through pentachora.
typedef FaceList<4, 3>::Iterator regina::Triangulation< 4 >::TetrahedronIterator |
Used to iterate through tetrahedra.
typedef FaceList<4, 2>::Iterator regina::Triangulation< 4 >::TriangleIterator |
Used to iterate through triangles.
typedef FaceList<4, 0>::Iterator regina::Triangulation< 4 >::VertexIterator |
Used to iterate through vertices.
|
inline |
A dimension-specific alias for adjacentSimplex().
See adjacentSimplex() for further information.
|
inline |
Returns a full 2-manifold triangulation describing the link of this edge.
This routine is fast (it uses a pre-computed triangulation where possible). The downside is that the triangulation is read-only, and does not contain any information on how the triangles in the link correspond to pentachora in the original triangulation (though this is easily deduced; see below). If you want a writable triangulation, or one with this extra information, then call buildLinkDetail() instead.
The triangulation of the edge link is built as follows. Let i lie between 0 and degree()-1 inclusive, let pent represent embedding(i).pentachoron()
, and let e represent embedding(i).edge()
. Then buildLink()->triangle(i)
is the triangle in the edge link that links edge e of pentachoron pent. In other words, buildLink()->triangle(i)
in the edge link is parallel to triangle pent->triangle(e)
in the surrounding 4-manifold triangulation.
The vertices of each triangle in the edge link are numbered as follows. Following the discussion above, suppose that buildLink()->triangle(i)
sits within pent
and is parallel to pent->triangle(e)
. Then vertices 0,1,2 of the triangle in the link will be parallel to vertices 0,1,2 of the corresponding Triangle<4>. The permutation pent->triangleMapping(e)
will map vertices 0,1,2 of the triangle in the link to the corresponding vertices of pent
(those opposite e
), and will map 3 and 4 to the vertices of e
itself.
This Edge<4> object will retain ownership of the triangulation that is returned. If you wish to edit the triangulation, you should make a new clone and edit the clone instead.
|
inline |
Returns a full 3-manifold triangulation describing the link of this vertex.
This routine is fast (it uses a pre-computed triangulation). The downside is that the triangulation is read-only, and does not contain any information on how the tetrahedra in the link correspond to pentachora in the original triangulation (though this is easily deduced; see below). If you want a writable triangulation, or one with this extra information, then call buildLinkDetail() instead.
The triangulation of the vertex link is built as follows. Let i lie between 0 and degree()-1 inclusive, let pent represent embedding(i).pentachoron()
, and let v represent embedding(i).vertex()
. Then buildLink()->tetrahedron(i)
is the tetrahedron in the vertex link that "slices off" vertex v from pentachoron pent. In other words, buildLink()->tetrahedron(i)
in the vertex link is parallel to tetrahedron pent->tetrahedron(v)
in the surrounding 4-manifold triangulation.
The vertices of each tetrahedron in the vertex link are numbered as follows. Following the discussion above, suppose that buildLink()->tetrahedron(i)
sits within pent
and is parallel to pent->tetrahedron(v)
. Then vertices 0,1,2,3 of the tetrahedron in the link will be parallel to vertices 0,1,2,3 of the corresponding Tetrahedron<4>. The permutation pent->tetrahedronMapping(v)
will map vertices 0,1,2,3 of the tetrahedron in the link to the corresponding vertices of pent
(those opposite v
), and will map 4 to v
itself.
This Vertex<4> object will retain ownership of the triangulation that is returned. If you wish to edit the triangulation, you should make a new clone and edit the clone instead.
Triangulation<2>* regina::Face< 4, 1 >::buildLinkDetail | ( | bool | labels = true , |
Isomorphism< 4 > ** | inclusion = 0 |
||
) | const |
Returns a full 2-manifold triangulation describing the link of this edge.
This routine is heavyweight (it computes a new triangulation each time). The benefit is that the triangulation is writeable, and optionally contain detailed information on how the triangles in the link correspond to pentachora in the original triangulation. If you do not need this extra information, consider using the faster buildLink() instead.
See the buildLink() documentation for an explanation of exactly how the triangulation will be constructed.
If labels is passed as true
, each triangle of the new edge link will be given a text description of the form p (e)
, where p
is the index of the pentachoron the triangle is from, and e
is the edge of that pentachoron that this triangle links.
If inclusion is non-null (i.e., it points to some Isomorphism<4> pointer p), then it will be modified to point to a new Isomorphism<4> that describes in detail how the individual triangles of the link sit within pentachora of the original triangulation. Specifically, after this routine is called, p->pentImage(i)
will indicate which pentachoron pent of the 4-manifold triangulation contains the ith triangle of the link. Moreover, p->facetPerm(i)
will indicate exactly where the ith triangle sits within pent: (i) it will send 3,4 to the vertices of pent that lie on the edge that the triangle links, with 3 and 4 mapping to vertices 0 and 1 respectively of the corresponding Edge<4>; and (ii) it will send 0,1,2 to the vertices of pent that are parallel to vertices 0,1,2 of this triangle.
The triangulation that is returned, as well as the isomorphism if one was requested, will be newly allocated. The caller of this routine is responsible for destroying these objects.
Strictly speaking, this is an abuse of the Isomorphism<4> class (the domain is a triangulation of the wrong dimension, and the map is not 1-to-1 into the range pentachora). We use it anyway, but you should not attempt to call any high-level routines (such as Isomorphism<4>::apply).
Triangulation<3>* regina::Face< 4, 0 >::buildLinkDetail | ( | bool | labels = true , |
Isomorphism< 4 > ** | inclusion = 0 |
||
) | const |
Returns a full 3-manifold triangulation describing the link of this vertex.
This routine is heavyweight (it computes a new triangulation each time). The benefit is that the triangulation is writeable, and optionally contain detailed information on how the tetrahedra in the link correspond to pentachora in the original triangulation. If you do not need this extra information, consider using the faster buildLink() instead.
See the buildLink() documentation for an explanation of exactly how the triangulation will be constructed.
If labels is passed as true
, each tetrahedron of the new vertex link will be given a text description of the form p (v)
, where p
is the index of the pentachoron the tetrahedron is from, and v
is the vertex of that pentachoron that this tetrahedron links.
If inclusion is non-null (i.e., it points to some Isomorphism<4> pointer p), then it will be modified to point to a new Isomorphism<4> that describes in detail how the individual tetrahedra of the link sit within pentachora of the original triangulation. Specifically, after this routine is called, p->pentImage(i)
will indicate which pentachoron pent of the 4-manifold triangulation contains the ith tetrahedron of the link. Moreover, p->facetPerm(i)
will indicate exactly where the ith tetrahedron sits within pent: it will send 4 to the vertex of pent that the tetrahedron links, and it will send 0,1,2,3 to the vertices of pent that are parallel to vertices 0,1,2,3 of this tetrahedron.
The triangulation that is returned, as well as the isomorphism if one was requested, will be newly allocated. The caller of this routine is responsible for destroying these objects.
Strictly speaking, this is an abuse of the Isomorphism<4> class (the domain is a triangulation of the wrong dimension, and the map is not 1-to-1 into the range pentachora). We use it anyway, but you should not attempt to call any high-level routines (such as Isomorphism<4>::apply).
bool regina::Triangulation< 4 >::collapseEdge | ( | Edge< 4 > * | 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.
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 (facets, 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
. size_t regina::Component< 4 >::countFaces | ( | ) | const |
Returns the number of subdim-faces in this component.
countFaces(subdim)
; that is, the template parameter subdim becomes the first argument of the function.
|
inlineoverridevirtual |
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. Implements regina::Packet.
long regina::Triangulation< 4 >::eulerCharManifold | ( | ) | const |
Returns the Euler characteristic of the corresponding compact manifold.
Instead of simply calculating V-E+F-T+P, this routine also treats ideal vertices as 3-manifold boundary components (i.e., effectively truncates them).
For ideal triangulations, this routine therefore computes the proper Euler characteristic of the manifold (unlike eulerCharTri(), which does not).
For triangulations whose vertex links are all 3-spheres or 3-balls, this routine and eulerCharTri() give identical results.
This routine does not yet handle invalid triangulations correctly. For this reason, this routine currently insists on a valid triangulation as a precondition.
Face<4, subdim>* regina::Component< 4 >::face | ( | size_t | index | ) | const |
Returns the requested subdim-face in this component.
Note that the index of a face in the component need not be the index of the same face in the overall triangulation.
face(subdim, index)
; that is, the template parameter subdim becomes the first argument of the function.index | the index of the desired face, ranging from 0 to countFaces<subdim>()-1 inclusive. |
const std::vector<Face<4, subdim>*>& regina::Component< 4 >::faces | ( | ) | const |
Returns a reference to the list of all subdim-faces in this component.
faces(subdim)
. It will then return a Python list containing all the subdim-faces of the triangulation.
|
inline |
Deprecated function that checks the eligibility of and/or performs a 5-1 Pachner move upon the given vertex.
This is an alias for pachner(Vertex<4>*, bool, bool); see that routine for further details.
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
.
|
inline |
Deprecated function that checks the eligibility of and/or performs a 4-2 move about the given edge.
This is an alias for pachner(Vertex<4>*, bool, bool); see that routine for further details.
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
. const AbelianGroup& regina::Triangulation< 4 >::homologyH2 | ( | ) | const |
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.
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, homologyH2() should be called again; this will be instantaneous if the group has already been calculated.
bool regina::Triangulation< 4 >::idealToFinite | ( | ) |
Converts an ideal triangulation into a finite triangulation.
All ideal or invalid vertices are truncated and thus converted into real boundary components made from unglued facets of pentachora.
true
if and only if the triangulation was changed. bool regina::Triangulation< 4 >::intelligentSimplify | ( | ) |
Attempts to simplify the triangulation as intelligently as possible without further input.
Specifically, this routine will attempt to reduce the number of pentachora in the triangulation.
Currently this routine uses simplifyToLocalMinimum() in combination with random 3-3 moves and book opening moves.
If this triangulation is currently oriented, then this operation will preserve the orientation.
true
if and only if the triangulation was changed.
|
inlineoverrideprotectedvirtual |
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. |
Implements regina::Packet.
|
inline |
Determines if this component is closed.
This is the case if and only if it has no boundary.
Note that ideal components are not closed. Likewise, components with invalid vertices are not closed. See Vertex<4>::isBoundary() for details.
true
if and only if this component is closed.
|
inline |
Determines if this triangulation is closed.
This is the case if and only if it has no boundary components.
Note that ideal triangulations are not closed. Triangulations with invalid vertices are also considered not closed; see Vertex<4>::isBoundary() for details.
true
if and only if this triangulation is closed.
|
inline |
Determines if this component is ideal.
This is the case if and only if it contains an ideal vertex as described by Vertex<4>::isIdeal().
true
if and only if this component is ideal.
|
inline |
Determines if this triangulation is ideal.
A triangulation is ideal if and only if (i) the triangulation is valid, and (ii) one of the vertex links is closed but not a 3-sphere.
Note that for 4-manifolds, isIdeal() will only return true
if the triangulation is valid (unlike 3-manifolds, where invalid ideal triangulations are allowed). This is to avoid situations like 4-manifold vertices whose links are cusped 3-manifolds (a situation that has no analogue in lower dimensions).
true
if and only if this triangulation is ideal.
|
inline |
Determines if this vertex is an ideal vertex.
To be an ideal, a vertex must (i) be valid, and (ii) have a closed vertex link that is not a 3-sphere.
true
if and only if this is an ideal vertex.
|
inline |
A dimension-specific alias for newSimplex().
See newSimplex() for further information.
|
inline |
A dimension-specific alias for newSimplex().
See newSimplex() for further information.
|
inline |
Deprecated function that checks the eligibility of and/or performs a 1-5 Pachner move upon the given pentachoron.
This differs from pachner(Simplex<4>*, bool, bool) in the labelling of the new pentachora:
simplices().back()->vertex(0)
, for consistency with Pachner moves on faces of other dimensions;simplices().back()->vertex(4)
, for consistency with earlier versions of Regina.p | the pentachoron about which to perform the move. |
check | this argument is ignored, since this move is always legal. |
perform | true if we are to perform the move (defaults to true ). |
true
always. bool regina::Triangulation< 4 >::openBook | ( | Tetrahedron< 4 > * | t, |
bool | check = true , |
||
bool | perform = true |
||
) |
Checks the eligibility of and/or performs a book opening move about the given tetrahedron.
This involves taking a tetrahedron meeting the boundary along precisely one, two or three triangles, and ungluing it to create two new boundary facets (thus exposing the pentachora it initially joined). This move is intended to open the way for new shellBoundary() moves.
This move can be done if:
The validity condition in particular is stronger than it needs to be, but the resulting "lost opportunities" only affect invalid triangulations.
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 (edges, components, etc.) will be reconstructed, which means that 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 | 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
.
|
inline |
A dimension-specific alias for removeAllSimplices().
See removeAllSimplices() for further information.
|
inline |
A dimension-specific alias for removeSimplex().
See removeSimplex() for further information.
|
inline |
A dimension-specific alias for removeSimplexAt().
See removeSimplexAt() for further information.
|
inline |
Explores all triangulations that can be reached from this via Pachner moves, without exceeding a given number of additional pentachora.
Specifically, this routine will iterate through all triangulations that can be reached from this triangulation via 1-5, 2-4, 3-3 and 4-2 Pachner moves, without ever exceeding height additional pentachora beyond the original number. Note that 5-1 moves are currently not supported, though this may be added in a future verson of Regina.
For every such triangulation (including this starting triangulation), this routine will call action (which must be a function or some other callable object).
true
, then this indicates that processing should stop immediately (i.e., no more triangulations will be processed).This routine can be very slow and very memory-intensive, since the number of triangulations it visits may be superexponential in the number of tetrahedra, and it records every triangulation that it visits (so as to avoid revisiting the same triangulation again). It is highly recommended that you begin with height = 1, and if necessary try increasing height one at a time until this routine becomes too expensive to run.
If height is negative, then there will be no bound on the number of additional pentachora. This means that the routine will never terminate, unless action returns true
for some triangulation that is passed to it.
If a progress tracker is passed, then the exploration of triangulations will take place in a new thread and this routine will return immediately.
To assist with performance, this routine can run in parallel (multithreaded) mode; simply pass the number of parallel threads in the argument nThreads. Even in multithreaded mode, if no progress tracker is passed then this routine will not return until processing has finished (i.e., either action returned true
, or the search was exhausted). All calls to action will be protected by a mutex (i.e., different threads will never be calling action at the same time).
If no progress tracker was passed then it will immediately return false
; otherwise the progress tracker will immediately be marked as finished.
height | the maximum number of additional pentachora to allow beyond the number of pentachora originally present in the triangulation, or a negative number if this should not be bounded. |
nThreads | the number of threads to use. If this is 1 or smaller then the routine will run single-threaded. |
tracker | a progress tracker through which progress will be reported, or 0 if no progress reporting is required. |
action | a function (or other callable object) to call upon each triangulation that is found. |
args | any additional arguments that should be passed to action, following the initial triangulation argument. |
true
or false
immediately according to whether a new thread could or could not be started. If no progress tracker is passed, then this routine will return true
if some call to action returned true
(thereby terminating the search early), or false
if the search ran to completion. bool regina::Triangulation< 4 >::shellBoundary | ( | Pentachoron< 4 > * | p, |
bool | check = true , |
||
bool | perform = true |
||
) |
Checks the eligibility of and/or performs a boundary shelling move on the given pentachoron.
This involves simply popping off a pentachoron that touches the boundary. This can be done if:
The validity condition in particular is stronger than it needs to be, but the resulting "lost opportunities" only affect invalid triangulations.
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 (edges, components, etc.) will be reconstructed, which means that any pointers to old skeletal objects can no longer be used.
p | the pentachoron 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
if and only if the requested move may be performed without changing the topology of the manifold. If check is false
, this function simply returns true
. bool regina::Triangulation< 4 >::simplifyExhaustive | ( | int | height = 1 , |
unsigned | nThreads = 1 , |
||
ProgressTrackerOpen * | tracker = 0 |
||
) |
Attempts to simplify this triangulation using a slow but exhaustive search through the Pachner graph.
This routine is more powerful but much slower than intelligentSimplify().
Specifically, this routine will iterate through all triangulations that can be reached from this triangulation via 1-5, 2-4, 3-3 and 4-2 Pachner moves, without ever exceeding height additional pentachora beyond the original number. Note that 5-1 moves are currently not supported, though this may be added in a future verson of Regina.
If at any stage it finds a triangulation with fewer pentachora than the original, then this routine will call intelligentSimplify() to shrink the triangulation further if possible and will then return true
. If it cannot find a triangulation with fewer pentachora then it will leave this triangulation unchanged and return false
.
This routine can be very slow and very memory-intensive: the number of triangulations it visits may be superexponential in the number of pentachora, and it records every triangulation that it visits (so as to avoid revisiting the same triangulation again). It is highly recommended that you begin with height = 1, and if this fails then try increasing height one at a time until either you find a simplification or the routine becomes too expensive to run.
If height is negative, then there will be no bound on the number of additional pentachora. This means that the routine will not terminate until a simpler triangulation is found. If no simpler diagram exists then the only way to terminate this function is to cancel the operation via a progress tracker (read on for details).
If you want a fast simplification routine, you should call intelligentSimplify() instead. The benefit of simplifyExhaustive() is that, for very stubborn triangulations where intelligentSimplify() finds itself stuck at a local minimum, simplifyExhaustive() is able to "climb out" of such wells.
If a progress tracker is passed, then the exhaustive simplification will take place in a new thread and this routine will return immediately. In this case, you will need to use some other means to determine whether the triangulation was eventually simplified (e.g., by examining size() after the tracker indicates that the operation has finished).
To assist with performance, this routine can run in parallel (multithreaded) mode; simply pass the number of parallel threads in the argument nThreads. Even in multithreaded mode, if no progress tracker is passed then this routine will not return until processing has finished (i.e., either the triangulation was simplified or the search was exhausted).
If this routine is unable to simplify the triangulation, then the triangulation will not be changed.
If no progress tracker was passed then it will immediately return false
; otherwise the progress tracker will immediately be marked as finished.
height | the maximum number of additional pentachora to allow beyond the number of pentachora originally present in the triangulation, or a negative number if this should not be bounded. |
nThreads | the number of threads to use. If this is 1 or smaller then the routine will run single-threaded. |
tracker | a progress tracker through which progress will be reported, or 0 if no progress reporting is required. |
true
or false
immediately according to whether a new thread could or could not be started. If no progress tracker is passed, then this routine will return true
if and only if the triangulation was successfully simplified to fewer pentachora. bool regina::Triangulation< 4 >::simplifyToLocalMinimum | ( | bool | perform = true | ) |
Uses all known simplification moves to reduce the triangulation monotonically to some local minimum number of pentachora.
End users will probably not want to call this routine. You should call intelligentSimplify() if you want a fast method of simplifying a triangulation.
The moves used by this routine include collapsing edges, 4-2 moves, and boundary shelling moves.
Moves that do not reduce the number of pentachora (such as 3-3 moves or book opening moves) are not used in this routine. Such moves do however feature in intelligentSimplify().
If this triangulation is currently oriented, then this operation will preserve the orientation.
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 pentachora; if perform is false
, this routine returns true
if and only if it determines that it is capable of performing such a change.
|
inline |
Deprecated function that checks the eligibility of and/or performs a 3-3 move about the given triangle.
This is an alias for pachner(Vertex<4>*, bool, bool); see that routine for further details.
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
.
|
inline |
Default constructor.
Creates an empty triangulation.
regina::Triangulation< 4 >::Triangulation | ( | const std::string & | description | ) |
"Magic" constructor that tries to find some way to interpret the given string as a triangulation.
At present, Regina understands the following types of strings (and attempts to parse them in the following order):
This list may grow in future versions of Regina.
Regina will also set the packet label accordingly.
If Regina cannot interpret the given string, this will be left as the empty triangulation.
description | a string that describes a 4-manifold triangulation. |
regina::Triangulation< 4 >::Triangulation | ( | const Triangulation< 4 > & | copy | ) |
Creates a copy of the given triangulation.
The packet tree structure and packet label are not copied.
This will clone any computed properties (such as homology, fundamental group, and so on) of the given triangulation also. If you want a "clean" copy that resets all properties to unknown, you can use the two-argument copy constructor instead.
copy | the triangulation to copy. |
regina::Triangulation< 4 >::Triangulation | ( | const Triangulation< 4 > & | copy, |
bool | cloneProps | ||
) |
Creates a new copy of the given triangulation, with the option of whether or not to clone its computed properties also.
Regardless of the argument cloneProps, if it is known that all vertex links of copy are 3-sphere or 3-balls, this knowledge will be copied over to the new triangulation.
copy | the triangulation to copy. |
cloneProps | true if this should also clone any computed properties of the given triangulation (such as homology, fundamental group, and so on), or false if the new triangulation should have all properties marked as unknown. |
|
inline |
Deprecated function that checks the eligibility of and/or performs a 2-4 move about the given facet.
This is an alias for pachner(Vertex<4>*, bool, bool); see that routine for further details.
f | the facet 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
. bool regina::Triangulation< 4 >::twoZeroMove | ( | Edge< 4 > * | 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.
This involves taking the two pentachora joined at that edge and squashing them flat. 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 (tetrahedra, 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
. bool regina::Triangulation< 4 >::twoZeroMove | ( | Triangle< 4 > * | t, |
bool | check = true , |
||
bool | perform = true |
||
) |
Checks the eligibility of and/or performs a 2-0 move about the given triangle of degree 2.
This involves taking the two pentachora joined at that triangle and squashing them flat.
The eligibility requirements for this move are somewhat involved, and are discussed in detail in the source code for those who are interested.
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 (tetrahedra, 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
. bool regina::Triangulation< 4 >::twoZeroMove | ( | Vertex< 4 > * | 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.
This involves taking the two pentachora joined at that vertex and squashing them flat. This can be done if:
v
in each pentachoron 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 (tetrahedra, 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
.
|
overridevirtual |
Writes a detailed text representation of this object to the given output stream.
This may be reimplemented by subclasses, but the parent Packet class offers a reasonable default implementation.
out | the output stream to which to write. |
Reimplemented from regina::Packet.
void regina::Face< 4, 0 >::writeTextShort | ( | std::ostream & | out | ) | const |
Writes a short text representation of this object to the given output stream.
out | the output stream to which to write. |
|
inlineoverridevirtual |
Writes a short text representation of this object to the given output stream.
This must be reimplemented by subclasses.
out | the output stream to which to write. |
Implements regina::Packet.
|
overrideprotectedvirtual |
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. |
Implements regina::Packet.
regina::Face< 4, 1 >::~Face | ( | ) |
Default destructor.
regina::Face< 4, 0 >::~Face | ( | ) |
Default destructor.
|
inlinevirtual |
Destroys this triangulation.
The constituent pentachora, the cellular structure and all other properties will also be deallocated.
|
friend |
Allow access to private members.
|
friend |
Allow access to private members.