Regina Calculation Engine
|
A generic helper class for working with triangulations of arbitrary dimension. More...
#include <generic/ngenerictriangulation.h>
Static Protected Member Functions | |
static std::string | isoSig (const typename DimTraits< dim >::Triangulation &tri, typename DimTraits< dim >::Isomorphism **relabelling=0) |
Constructs the isomorphism signature for the given triangulation. More... | |
static DimTraits< dim > ::Triangulation * | fromIsoSig (const std::string &sig) |
Recovers a full triangulation from an isomorphism signature. More... | |
static size_t | isoSigComponentSize (const std::string &sig) |
Deduces the number of top-dimensional simplices in a connected triangulation from its isomorphism signature. More... | |
Additional Inherited Members | |
![]() | |
typedef void | Triangulation |
The main data type for a dim-manifold triangulation. More... | |
typedef void | Simplex |
The data type for a top-dimensional simplex in a dim-manifold triangulation. More... | |
typedef void | Isomorphism |
The data type for an isomorphism between two dim-manifold triangulations. More... | |
typedef void | FacetPairing |
The data type that represents a pairing of facets of top-dimensional simplices in a dim-manifold triangulation. More... | |
typedef void | Perm |
The permutation type used to describe gluings between top-dimensional simplices in a dim-manifold triangulation. More... | |
A generic helper class for working with triangulations of arbitrary dimension.
This class is designed to implement member functions of the various triangulation classes in a unified, dimension-agnostic manner.
End users should not use this class directly. Instead they should call the corresponding member functions from the corresponding triangulation classes (NTriangulation and so on).
|
staticprotected |
Recovers a full triangulation from an isomorphism signature.
See isoSig() for more information on isomorphism signatures. It will be assumed that the signature describes a triangulation of dimension dim.
The triangulation that is returned will be newly created.
Calling isoSig() followed by fromIsoSig() is not guaranteed to produce an identical triangulation to the original, but it is guaranteed to produce a combinatorially isomorphic triangulation.
sig | the isomorphism signature of the triangulation to construct. Note that, unlike dehydration strings for 3-manifold triangulations, case is important for isomorphism signatures. |
|
staticprotected |
Constructs the isomorphism signature for the given triangulation.
An isomorphism signature is a compact text representation of a triangulation. Unlike dehydrations for 3-manifold triangulations, an isomorphism signature uniquely determines a triangulation up to combinatorial isomorphism (assuming the dimension is known in advance). That is, two triangulations of dimension dim are combinatorially isomorphic if and only if their isomorphism signatures are the same.
The isomorphism signature is constructed entirely of printable characters, and has length proportional to n log n
, where n is the number of simplices.
Isomorphism signatures are more general than dehydrations: they can be used with any triangulation (including closed, bounded and/or disconnected triangulations, as well as triangulations with large numbers of triangles).
The time required to construct the isomorphism signature of a triangulation is O(n^2 log^2 n)
.
The routine fromIsoSig() can be used to recover a triangulation from an isomorphism signature. The triangulation recovered might not be identical to the original, but it will be combinatorially isomorphic.
If relabelling is non-null (i.e., it points to some Isomorphism pointer p), then it will be modified to point to a new isomorphism that describes the precise relationship between this triangulation and the reconstruction from fromIsoSig(). Specifically, the triangulation that is reconstructed from fromIsoSig() will be combinatorially identical to relabelling.apply(this)
.
tri | the triangulation whose isomorphism signature will be computed. |
relabelling | if non-null, this will be modified to point to a new isomorphism describing the relationship between this triangulation and that reconstructed from fromIsoSig(), as described above. |
|
staticprotected |
Deduces the number of top-dimensional simplices in a connected triangulation from its isomorphism signature.
See isoSig() for more information on isomorphism signatures. It will be assumed that the signature describes a triangulation of dimension dim.
If the signature describes a connected triangulation, this routine will simply return the size of that triangulation (e.g., the number of tetrahedra in the case dim = 3). You can also pass an isomorphism signature that describes a disconnected triangulation; however, this routine will only return the number of simplices in the first connected component. If you need the total number of simplices in a disconnected triangulation, you will need to reconstruct the full triangulation by calling fromIsoSig() instead.
This routine is very fast, since it only examines the first few characters of the isomorphism signature (in which the size of the first component is encoded). However, it is therefore possible to pass an invalid isomorphism signature and still receive a positive result. If you need to test whether a signature is valid or not, you must call fromIsoSig() instead, which will examine the entire signature in full.
sig | an isomorphism signature of a dim-dimensional triangulation. Note that, unlike dehydration strings for 3-manifold triangulations, case is important for isomorphism signatures. |