4-Manifold Triangulations

## 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...
const REGINA_INLINE_REQUIRED 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 >

## Constructors and Destructors

| regina::Triangulation< 4 >::Triangulation ()
| Default constructor. More...
| regina::Triangulation< 4 >::Triangulation (const Triangulation &copy)
| Creates a copy of the given triangulation. More...
| regina::Triangulation< 4 >::Triangulation (const Triangulation &copy, 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
| Writes a short text representation of this object to the given output stream. More...
virtual void | regina::Triangulation< 4 >::writeTextLong (std::ostream &out) const
| Writes a detailed text representation of this object to the given output stream. More...
virtual bool | regina::Triangulation< 4 >::dependsOnParent () const
| 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 >::fourTwoMove (Edge< 4 > *e, bool check=true, bool perform=true)
| 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)
| 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)
| 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)
| Checks the eligibility of and/or performs a 1-5 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 >::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...

## 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
| Makes a newly allocated copy of this packet. More...
virtual void | regina::Triangulation< 4 >::writeXMLPacketData (std::ostream &out) const
| Writes a chunk of XML containing the data for this packet only. More...

## Detailed Description

Details for implementing triangulations of 4-manifolds.

## Typedef Documentation

## Dim4BoundaryComponent

typedef BoundaryComponent<4> regina::Dim4BoundaryComponent

Deprecated typedef for backward compatibility.

This typedef will be removed in a future release of Regina.

Deprecated:
  Instead of the old typedef Dim4BoundaryComponent, you should use the real class name BoundaryComponent<4>.

## Dim4Component

typedef Component<4> regina::Dim4Component

Deprecated typedef for backward compatibility.

This typedef will be removed in a future release of Regina.

Deprecated:
  Instead of the old typedef Dim4Component, you should use the real class name Component<4>.

## Dim4Edge

typedef Face<4, 1> regina::Dim4Edge

Deprecated typedef for backward compatibility.

This typedef will be removed in a future release of Regina.

Deprecated:
  Instead of the old typedef Dim4Edge, you should use either the new alias Edge<4>, or the full class name Face<4, 1>.

## Dim4EdgeEmbedding

typedef FaceEmbedding<4, 1> regina::Dim4EdgeEmbedding

Deprecated typedef for backward compatibility.

This typedef will be removed in a future release of Regina.

Deprecated:
  Instead of the old typedef Dim4EdgeEmbedding, you should use either the new alias EdgeEmbedding<4>, or the full class name FaceEmbedding<4, 1>.

## Dim4Pentachoron

typedef Simplex<4> regina::Dim4Pentachoron

Deprecated typedef for backward compatibility.

This typedef will be removed in a future release of Regina.

Deprecated:
  Instead of the old typedef Dim4Pentachoron, you should use the new alias Simplex<4> (or, if you prefer, the full class name Face<4, 4>).

## Dim4Tetrahedron

typedef Face<4, 3> regina::Dim4Tetrahedron

Deprecated typedef for backward compatibility.

This typedef will be removed in a future release of Regina.

Deprecated:
  Instead of the old typedef Dim4Tetrahedron, you should use either the new alias Tetrahedron<4>, or the full class name Face<4, 3>.

## Dim4TetrahedronEmbedding

typedef FaceEmbedding<4, 3> regina::Dim4TetrahedronEmbedding

Deprecated typedef for backward compatibility.

This typedef will be removed in a future release of Regina.

Deprecated:
  Instead of the old typedef Dim4TetrahedronEmbedding, you should use either the new alias TetrahedronEmbedding<4>, or the full class name FaceEmbedding<4, 3>.

## Dim4Triangle

typedef Face<4, 2> regina::Dim4Triangle

Deprecated typedef for backward compatibility.

This typedef will be removed in a future release of Regina.

Deprecated:
  Instead of the old typedef Dim4Triangle, you should use either the new alias Triangle<4>, or the full class name Face<4, 2>.

## Dim4TriangleEmbedding

typedef FaceEmbedding<4, 2> regina::Dim4TriangleEmbedding

Deprecated typedef for backward compatibility.

This typedef will be removed in a future release of Regina.

Deprecated:
  Instead of the old typedef Dim4TriangleEmbedding, you should use either the new alias TriangleEmbedding<4>, or the full class name FaceEmbedding<4, 2>.

## Dim4Triangulation

typedef Triangulation<4> regina::Dim4Triangulation

Deprecated typedef for backward compatibility.

This typedef will be removed in a future release of Regina.

Deprecated:
  Instead of the old typedef Dim4Triangulation, you should use the templated class name Triangulation<4>.

## Dim4Vertex

typedef Face<4, 0> regina::Dim4Vertex

Deprecated typedef for backward compatibility.

This typedef will be removed in a future release of Regina.

Deprecated:
  Instead of the old typedef Dim4Vertex, you should use either the new alias Vertex<4>, or the full class name Face<4, 0>.

## Dim4VertexEmbedding

typedef FaceEmbedding<4, 0> regina::Dim4VertexEmbedding

Deprecated typedef for backward compatibility.

This typedef will be removed in a future release of Regina.

Deprecated:
  Instead of the old typedef Dim4VertexEmbedding, you should use either the new alias VertexEmbedding<4>, or the full class name FaceEmbedding<4, 0>.

## EdgeIterator

typedef FaceList<4, 1>::Iterator regina::Triangulation< 4 >::EdgeIterator

Used to iterate through edges.

## PentachoronIterator

typedef std::vector<Pentachoron<4>*>::const_iterator regina::Triangulation< 4 >::PentachoronIterator

A dimension-specific alias for SimplexIterator, used to iterate through pentachora.

## TetrahedronIterator

typedef FaceList<4, 3>::Iterator regina::Triangulation< 4 >::TetrahedronIterator

Used to iterate through tetrahedra.

## TriangleIterator

typedef FaceList<4, 2>::Iterator regina::Triangulation< 4 >::TriangleIterator

Used to iterate through triangles.

## VertexIterator

typedef FaceList<4, 0>::Iterator regina::Triangulation< 4 >::VertexIterator

Used to iterate through vertices.

## Function Documentation

## adjacentPentachoron()

Simplex< 4 > * regina::Face< 4, 4 >::adjacentPentachoron | ( | int | facet | ) | const

inline

A dimension-specific alias for adjacentSimplex().

See adjacentSimplex() for further information.

## buildLink() [1/2]

const Triangulation< 2 > * regina::Face< 4, 1 >::buildLink | ( |  | ) | const

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.

Python:\n Since Python does not distinguish between const and
  non-const, this routine will make a deep copy of the edge link. You are free to modify the triangulation that is returned.

Returns
  the read-only triangulated link of this edge.

## buildLink() [2/2]

const Triangulation< 3 > * regina::Face< 4, 0 >::buildLink | ( |  | ) | const

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.

Python:\n Since Python does not distinguish between const and
  non-const, this routine will make a deep copy of the vertex link. You are free to modify the triangulation that is returned.

Returns
  the read-only triangulated link of this vertex.

## buildLinkDetail() [1/2]

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

Python:\n The second (isomorphism) argument is not present.
  Instead this routine returns a pair (triangulation, isomorphism). As a side-effect, the isomorphism will always be constructed (i.e., it is not optional).

Python:\n Since Python does not distinguish between const and
  non-const, this routine will make a deep copy of the edge link. You are free to modify the triangulation that is returned.

Returns
  a newly constructed triangulation of the link of this edge.

## buildLinkDetail() [2/2]

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

Python:\n The second (isomorphism) argument is not present.
  Instead this routine returns a pair (triangulation, isomorphism). As a side-effect, the isomorphism will always be constructed (i.e., it is not optional).

Python:\n Since Python does not distinguish between const and
  non-const, this routine will make a deep copy of the vertex link. You are free to modify the triangulation that is returned.

Returns
  a newly constructed triangulation of the link of this vertex.

## collapseEdge()

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.

Precondition
  If the move is being performed and no check is being run, it must be known in advance that the move is legal.
  The given edge is an edge of this triangulation.

Parameters

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

Returns
  If check is `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`.

## countFaces()

template<int subdim>

size_t regina::Component< 4 >::countFaces | ( |  | ) | const

Returns the number of subdim-faces in this component.

Precondition
  The template argument subdim is between 0 and 3 inclusive.

Python:\n Python does not support templates. Instead,
  Python users should call this function in the form `countFaces(subdim)`; that is, the template parameter subdim becomes the first argument of the function.

Returns
  the number of subdim-faces.

## dependsOnParent()

bool regina::Triangulation< 4 >::dependsOnParent | ( |  | ) | const

inline virtual

Determines if this packet depends upon its parent.

This is true if the parent cannot be altered without invalidating or otherwise upsetting this packet.

Returns
  `true` if and only if this packet depends on its parent.

Implements regina::Packet.

## eulerCharManifold()

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.

Precondition
  This triangulation is valid.

Returns
  the Euler characteristic of the corresponding compact manifold.

## face()

template<int subdim>

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.

Precondition
  The template argument subdim is between 0 and 3 inclusive.

Python:\n Python does not support templates. Instead,
  Python users should call this function in the form `face(subdim, index)`; that is, the template parameter subdim becomes the first argument of the function.

Parameters

  index | the index of the desired face, ranging from 0 to countFaces<subdim>()-1 inclusive.

Returns
  the requested face.

## faces()

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.

Precondition
  The template argument subdim is between 0 and 3 inclusive.

Python:\n Python users should call this function in the
  form `faces(subdim)`. It will then return a Python list containing all the subdim-faces of the triangulation.

Returns
  the list of all subdim-faces.

## fourTwoMove()

bool regina::Triangulation< 4 >::fourTwoMove | ( | Edge< 4 > * | e,
|  | bool | check = `true`,
|  | bool | perform = `true`
| ) |  |

Checks the eligibility of and/or performs a 4-2 move about the given edge.

This involves replacing the four pentachora joined at that edge with two pentachora joined along a single facet. This can be done iff (i) the edge is valid and non-boundary, (ii) the four pentachora are distinct, and (iii) the pentachora are joined in such a way that the link of the edge is the standard 3-simplex triangulation of the 2-sphere.

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.

See the page on Pachner moves on triangulations for definitions and terminology relating to Pachner moves. After the move, the new belt face will be `pentachora().back()->tetrahedron(4)`.

Precondition
  If the move is being performed and no check is being run, it must be known in advance that the move is legal.
  The given edge is an edge of this triangulation.

Parameters

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

Returns
  If check is `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`.

## homologyH2()

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.

Precondition
  This triangulation is valid.

Returns
  the second homology group.

## idealToFinite()

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.

Returns
  `true` if and only if the triangulation was changed.

## intelligentSimplify()

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.

Warning
  The specific behaviour of this routine will almost certainly change between releases. At present, simplification for 4-manifold triangulations is extremely weak (as opposed to 3-manifolds, where a rich library of simplification techinques is available to call upon).

Returns
  `true` if and only if the triangulation was changed.

## internalClonePacket()

Packet * regina::Triangulation< 4 >::internalClonePacket | ( | Packet * | parent | ) | const

inline protected virtual

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.

Parameters

  parent | the parent beneath which the new packet will eventually be inserted.

Returns
  the newly allocated packet.

Implements regina::Packet.

## isClosed() [1/2]

bool regina::Component< 4 >::isClosed | ( |  | ) | const

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.

Returns
  `true` if and only if this component is closed.

## isClosed() [2/2]

bool regina::Triangulation< 4 >::isClosed | ( |  | ) | const

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.

Returns
  `true` if and only if this triangulation is closed.

## isIdeal() [1/3]

bool regina::Component< 4 >::isIdeal | ( |  | ) | const

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

Returns
  `true` if and only if this component is ideal.

## isIdeal() [2/3]

bool regina::Face< 4, 0 >::isIdeal | ( |  | ) | const

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.

Returns
  `true` if and only if this is an ideal vertex.

## isIdeal() [3/3]

bool regina::Triangulation< 4 >::isIdeal | ( |  | ) | const

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

Returns
  `true` if and only if this triangulation is ideal.

## newPentachoron() [1/2]

Pentachoron< 4 > * regina::Triangulation< 4 >::newPentachoron | ( |  | ) |

inline

A dimension-specific alias for newSimplex().

See newSimplex() for further information.

## newPentachoron() [2/2]

Pentachoron< 4 > * regina::Triangulation< 4 >::newPentachoron | ( | const std::string & | desc | ) |

inline

A dimension-specific alias for newSimplex().

See newSimplex() for further information.

## oneFiveMove()

bool regina::Triangulation< 4 >::oneFiveMove | ( | Pentachoron< 4 > * | p,
|  | bool | check = `true`,
|  | bool | perform = `true`
| ) |  |

Checks the eligibility of and/or performs a 1-5 move upon the given pentachoron.

This involves replacing one pentachoron with five pentachora: each new pentachoron runs from one facet of the original pentachoron to a new common internal degree five 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 (facets, components, etc.) will be reconstructed, which means any pointers to old skeletal objects (such as the argument p) can no longer be used.

See the page on Pachner moves on triangulations for definitions and terminology relating to Pachner moves. After the move, the new belt face will be `pentachora().back()->vertex(4)`.

Precondition
  The given pentachoron is a pentachoron of this triangulation.

Parameters

  p | the pentachoron 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`).

Returns
  `true` always.

## openBook()

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:

- all vertices, edges and triangles of the tetrahedron are valid;
- the tetrahedron meets the boundary in precisely one, two or three triangles (and therefore also joins two pentachora);
- if the tetrahedron meets the boundary in precisely one triangle, then the remaining vertex of the tetrahedron is non-boundary, and no two of the remaining three edges of the tetrahedron are identified;
- if the tetrahedron meets the boundary in precisely two triangles, then the remaining edge of the tetrahedron is non-boundary, and the remaining two triangles of the tetrahedron are not identified.

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.

Precondition
  If the move is being performed and no check is being run, it must be known in advance that the move is legal.
  The given tetrahedron is a tetrahedron of this triangulation.

Parameters

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

Returns
  If check is `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`.

## removeAllPentachora()

void regina::Triangulation< 4 >::removeAllPentachora | ( |  | ) |

inline

A dimension-specific alias for removeAllSimplices().

See removeAllSimplices() for further information.

## removePentachoron()

void regina::Triangulation< 4 >::removePentachoron | ( | Pentachoron< 4 > * | tet | ) |

inline

A dimension-specific alias for removeSimplex().

See removeSimplex() for further information.

## removePentachoronAt()

void regina::Triangulation< 4 >::removePentachoronAt | ( | size_t | index | ) |

inline

A dimension-specific alias for removeSimplexAt().

See removeSimplexAt() for further information.

## shellBoundary()

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:

- all edges and triangles of the pentachoron are valid;
- precisely one, two, three or four facets of the pentachoron lie in the boundary;
- if one facet lies in the boundary, then the opposite vertex does not lie in the boundary, and no two of the remaining four edges are identified;
- if two facets lie in the boundary, then the edge that sits opposite their common triangle does not lie in the boundary, and no two of the remaining three triangles are identified;
- if three facets lie in the boundary, then the triangle that sits opposite their common edge does not lie in the boundary, and the remaining two facets of the tetrahedron are not identified.

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.

Precondition
  If the move is being performed and no check is being run, it must be known in advance that the move is legal.
  The given pentachoron is a pentachoron of this triangulation.

Parameters

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

Returns
  If check is true, this function returns `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`.

## simplifyToLocalMinimum()

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

Warning
  The specific behaviour of this routine will almost certainly change between releases. At present, simplification for 4-manifold triangulations is extremely weak (as opposed to 3-manifolds, where a rich library of simplification techinques is available to call upon).

Parameters

  perform | `true` if we are to perform the simplifications, or `false` if we are only to investigate whether simplifications are possible (defaults to `true`).

Returns
  if perform is `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.

## threeThreeMove()

bool regina::Triangulation< 4 >::threeThreeMove | ( | Triangle< 4 > * | t,
|  | bool | check = `true`,
|  | bool | perform = `true`
| ) |  |

Checks the eligibility of and/or performs a 3-3 move about the given triangle.

This involves replacing the three pentachora joined along that triangle with three pentachora joined along a transverse triangle. This can be done iff (i) the triangle is valid and non-boundary, and (ii) the three pentachora 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 (facets, components, etc.) will be reconstructed, which means any pointers to old skeletal objects (such as the argument f) can no longer be used.

See the page on Pachner moves on triangulations for definitions and terminology relating to Pachner moves. After the move, the new belt face will be `pentachora().back()->triangle(Triangle<4>::triangleNumber[0][1][2])`.

Precondition
  If the move is being performed and no check is being run, it must be known in advance that the move is legal.
  The given triangle is a triangle of this triangulation.

Parameters

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

Returns
  If check is `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`.

## Triangulation() [1/4]

regina::Triangulation< 4 >::Triangulation | ( |  | ) |

inline

Default constructor.

Creates an empty triangulation.

## Triangulation() [2/4]

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

- isomorphism signatures (see fromIsoSig()).

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.

Parameters

  description | a string that describes a 4-manifold triangulation.

## Triangulation() [3/4]

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.

Parameters

  copy | the triangulation to copy.

## Triangulation() [4/4]

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.

Parameters

  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.

## twoFourMove()

bool regina::Triangulation< 4 >::twoFourMove | ( | Tetrahedron< 4 > * | f,
|  | bool | check = `true`,
|  | bool | perform = `true`
| ) |  |

Checks the eligibility of and/or performs a 2-4 move about the given facet.

This involves replacing the two pentachora joined along that facet with four pentachora joined along a transverse edge. This can be done iff the two pentachora 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 (facets, components, etc.) will be reconstructed, which means any pointers to old skeletal objects (such as the argument f) can no longer be used.

See the page on Pachner moves on triangulations for definitions and terminology relating to Pachner moves. After the move, the new belt face will be `pentachora().back()->edge(Edge<4>::edgeNumber[0][1])`.

Precondition
  If the move is being performed and no check is being run, it must be known in advance that the move is legal.
  The given facet is a facet of this triangulation.

Parameters

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

Returns
  If check is `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`.

## twoZeroMove() [1/2]

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:

- the edge is valid and non-boundary and has a 2-sphere edge link;
- the two pentachora are distinct;
- the triangles opposite e in each pentachoron are distinct and not both boundary;
- if facets f1 and f2 of one pentachoron are to be flattened onto facets g1 and g2 of the other respectively, then (a) f1 and g1 are distinct, (b) f2 and g2 are distinct, (c) we do not have both f1 = g2 and g1 = f2, (d) we do not have both f1 = f2 and g1 = g2, and (e) we do not have two of the facets boundary and the other two identified;
- the two pentachora meet each other on all three facets touching the edge (as opposed to meeting each other on one facet and being glued to themselves along the other two).

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.

Precondition
  If the move is being performed and no check is being run, it must be known in advance that the move is legal.
  The given edge is an edge of this triangulation.

Parameters

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

Returns
  If check is `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`.

## twoZeroMove() [2/2]

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.

Precondition
  If the move is being performed and no check is being run, it must be known in advance that the move is legal.
  The given triangle is a triangle of this triangulation.

Parameters

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

Returns
  If check is `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`.

## writeTextLong()

virtual void regina::Triangulation< 4 >::writeTextLong | ( | std::ostream & | out | ) | const

virtual

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.

Python:\n Not present.

Parameters

  out | the output stream to which to write.

Reimplemented from regina::Packet.

## writeTextShort() [1/2]

void regina::Triangulation< 4 >::writeTextShort | ( | std::ostream & | out | ) | const

inline virtual

Writes a short text representation of this object to the given output stream.

This must be reimplemented by subclasses.

Python:\n Not present.

Parameters

  out | the output stream to which to write.

Implements regina::Packet.

## writeTextShort() [2/2]

void regina::Face< 4, 0 >::writeTextShort | ( | std::ostream & | out | ) | const

Writes a short text representation of this object to the given output stream.

Python:\n Not present.

Parameters

  out | the output stream to which to write.

## writeXMLPacketData()

virtual void regina::Triangulation< 4 >::writeXMLPacketData | ( | std::ostream & | out | ) | const

protected virtual

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.

Parameters

  out | the output stream to which the XML should be written.

Implements regina::Packet.

## ~Face() [1/2]

regina::Face< 4, 1 >::~Face | ( |  | ) |

Default destructor.

## ~Face() [2/2]

regina::Face< 4, 0 >::~Face | ( |  | ) |

Default destructor.

## ~Triangulation()

regina::Triangulation< 4 >::~Triangulation | ( |  | ) |

inline virtual

Destroys this triangulation.

The constituent pentachora, the cellular structure and all other properties will also be deallocated.

## Friends

## detail::TriangulationBase< 4 > [1/2]

friend class detail::TriangulationBase< 4 >

friend

Allow access to private members.

## detail::TriangulationBase< 4 > [2/2]

friend class detail::TriangulationBase< 4 >

friend

Allow access to private members.

Copyright © 1999-2016, The Regina development team
This software is released under the GNU General Public License, with some additional permissions; see the source code for details.
For further information, or to submit a bug or other problem, please contact Ben Burton (bab@maths.uq.edu.au).