regina::NGenericTriangulation< dim > Class Template Reference
Generic code

A generic helper class for working with triangulations of arbitrary dimension. More...

`#include <generic/ngenerictriangulation.h>`

Inheritance diagram for regina::NGenericTriangulation< dim >:

## 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

Public Types inherited from regina::DimTraits< dim >
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...

## Detailed Description

### template<int dim>
class regina::NGenericTriangulation< dim >

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

Warning
  The API for this class has not yet been finalised. This means that the class interface may change in new versions of Regina, without maintaining backward compatibility. If you use this class directly in your own code, please watch the detailed changelogs upon new releases to see if you need to make changes to your code.

Python:
  Not present.

Precondition
  The template argument dim must be one of the dimensions that Regina supports.

## Member Function Documentation

template<int dim>

static DimTraits<dim>::Triangulation* regina::NGenericTriangulation< dim >::fromIsoSig | ( | const std::string & | sig | ) |

static protected

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.

Warning
  Do not mix isomorphism signatures between dimensions! It is possible that the same string could corresponding to both a p-dimensional triangulation and a q-dimensional triangulation for different p and q.

Parameters

  sig | the isomorphism signature of the triangulation to construct. Note that, unlike dehydration strings for 3-manifold triangulations, case is important for isomorphism signatures.

Returns
  a newly allocated triangulation if the reconstruction was successful, or null if the given string was not a valid isomorphism signature.

template<int dim>

static std::string regina::NGenericTriangulation< dim >::isoSig | ( | const typename DimTraits< dim >::Triangulation & | tri,
|  | typename DimTraits< dim >::Isomorphism ** | relabelling = `0`
| ) |  |

static protected

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

Precondition
  If relabelling is non-null, then this triangulation must be non-empty and connected. The facility to return a relabelling for disconnected triangulations may be added to Regina in a later release.

Warning
  Do not mix isomorphism signatures between dimensions! It is possible that the same string could corresponding to both a p-dimensional triangulation and a q-dimensional triangulation for different p and q.

Parameters

  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.

Returns
  the isomorphism signature of the given triangulation.

template<int dim>

static size_t regina::NGenericTriangulation< dim >::isoSigComponentSize | ( | const std::string & | sig | ) |

static protected

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.

Warning
  Do not mix isomorphism signatures between dimensions! It is possible that the same string could corresponding to both a p-dimensional triangulation and a q-dimensional triangulation for different p and q.

Parameters

  sig | an isomorphism signature of a dim-dimensional triangulation. Note that, unlike dehydration strings for 3-manifold triangulations, case is important for isomorphism signatures.

Returns
  the number of top-dimensional simplices in the first connected component, or 0 if this could not be determined because the given string was not a valid isomorphism signature.

The documentation for this class was generated from the following file:

- generic/ngenerictriangulation.h

Copyright © 1999-2013, 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@debian.org).