Regina Calculation Engine
|
Represents a top-dimensional simplex in a dim-manifold triangulation. More...
#include <triangulation/generic.h>
Public Types | |
typedef IntOfMinSize<(dim/8)+1 >::utype | FacetMask |
An unsigned integer type with at least dim+1 bits. More... | |
Public Member Functions | |
const std::string & | description () const |
Returns the description associated with this simplex. More... | |
void | setDescription (const std::string &desc) |
Sets the description associated with this simplex. More... | |
size_t | index () const |
Returns the index of this simplex in the underlying triangulation. More... | |
Simplex< dim > * | adjacentSimplex (int facet) const |
Returns the adjacent simplex that is glued to the given facet of this simplex. More... | |
Perm< dim+1 > | adjacentGluing (int facet) const |
Returns a permutation that indicates precisely how this simplex is glued to the adjacent simplex across the given facet. More... | |
int | adjacentFacet (int facet) const |
If the given facet of this simplex is glued to facet f of some adjacent simplex, then this routine returns the adjacent facet number f. More... | |
bool | hasBoundary () const |
Determines if this simplex has any facets that lie on the triangulation boundary. More... | |
void | join (int myFacet, Simplex< dim > *you, Perm< dim+1 > gluing) |
Joins the given facet of this simplex to some facet of another simplex. More... | |
Simplex< dim > * | unjoin (int myFacet) |
Unglues the given facet of this simplex from whatever it is joined to. More... | |
void | isolate () |
Unglues this simplex from any adjacent simplices. More... | |
Triangulation< dim > * | triangulation () const |
Returns the triangulation to which this simplex belongs. More... | |
Component< dim > * | component () const |
Returns the connected component of the triangulation to which this simplex belongs. More... | |
template<int subdim> | |
Face< dim, subdim > * | face (int face) const |
Returns the subdim-face of the underlying triangulation that appears as the given subdim-face of this simplex. More... | |
Face< dim, 1 > * | edge (int i, int j) const |
Returns the edge of this simplex that connects the two given vertices of this simplex. More... | |
Edge< 2 > * | edge (int i, int j) const |
Edge< 3 > * | edge (int i, int j) const |
Edge< 4 > * | edge (int i, int j) const |
template<int subdim> | |
Perm< dim+1 > | faceMapping (int face) const |
Examines the given subdim-face of this simplex, and returns the mapping between the underlying subdim-face of the triangulation and the individual vertices of this simplex. More... | |
int | orientation () const |
Returns the orientation of this simplex in the dim-dimensional triangulation. More... | |
bool | facetInMaximalForest (int facet) const |
Determines whether the given facet of this simplex belongs to the maximal forest that has been chosen for the dual 1-skeleton of the underlying triangulation. More... | |
void | writeTextShort (std::ostream &out) const |
Writes a short text representation of this object to the given output stream. More... | |
void | writeTextLong (std::ostream &out) const |
Writes a detailed text representation of this object to the given output stream. More... | |
size_t | markedIndex () const |
Returns the index at which this object is stored in an MarkedVector. More... | |
std::string | str () const |
Returns a short text representation of this object. More... | |
std::string | utf8 () const |
Returns a short text representation of this object using unicode characters. More... | |
std::string | detail () const |
Returns a detailed text representation of this object. More... | |
Protected Member Functions | |
Face (Triangulation< dim > *tri) | |
Creates a new simplex with no description and no facets joined to anything. More... | |
Face (const std::string &desc, Triangulation< dim > *tri) | |
Creates a new simplex with the given description and no facets joined to anything. More... | |
bool | sameDegrees (const SimplexFacesSuite< dim, subdim > &other, Perm< dim+1 > p) const |
Tests whether the k-face degrees of this and the given simplex are identical, under the given relabelling, for all faces of all dimensions k ≤ subdim. More... | |
bool | sameDegrees (const SimplexFaces< dim, subdim > &other, Perm< dim+1 > p) const |
Tests whether the subdim-face degrees of this and the given simplex are identical, under the given relabelling. More... | |
void | clear () |
Resets all face pointers to null. More... | |
Protected Attributes | |
Face< dim, subdim > * | face_ [FaceNumbering< dim, subdim >::nFaces] |
The faces of the underlying triangulation that form the individual subdim-faces of this simplex. More... | |
Perm< dim+1 > | mapping_ [FaceNumbering< dim, subdim >::nFaces] |
For each subdim-face of this simplex, maps vertices (0,1,...,subdim) of the underlying subdim-face of the triangulation to the corresponding vertices of this simplex, as described by faceMapping(). More... | |
Friends | |
class | Triangulation< dim > |
class | detail::TriangulationBase< dim > |
Represents a top-dimensional simplex in a dim-manifold triangulation.
For example, for 3-manifolds this class represents a tetrahedron, and for 2-manifolds this class represents a triangle.
Although this is a specialisation of the Face class template, this class is typically referred to using the alias Simplex<dim>. For Regina's standard dimensions, you can also use the aliases Triangle<2>, Tetrahedron<3> and Pentachoron<4>.
Top-dimensional simplices cannot exist in isolation (without a triangulation object), and they cannot be created or destroyed directly. Instead, you create and destroy them via the underlying triangulation, by calling routines such as Triangulation<dim>::newSimplex() or Triangulation<dim>::removeSimplex().
Amongst other things, this class is used to view and change the gluings between top-dimensional simplices. For this we number the facets and vertices of each simplex 0,...,dim, so that facet i is opposite vertex i.
Each simplex may have an optional description. This is typically a human-readable piece of text. Descriptions are not required, and do not need to be unique.
For Regina's standard dimensions, this template is specialised and offers significant extra functionality. In order to use these specialised classes, you will need to include the corresponding triangulation headers (e.g., triangulation/dim2.h for dim = 2, or triangulation/dim3.h for dim = 3).
dim | the dimension of the underlying triangulation. This must be between 2 and 15 inclusive. |
|
inherited |
Returns a detailed text representation of this object.
This text may span many lines, and should provide the user with all the information they could want. It should be human-readable, should not contain extremely long lines (which cause problems for users reading the output in a terminal), and should end with a final newline. There are no restrictions on the underlying character set.
|
inlineprotectedinherited |
Tests whether the k-face degrees of this and the given simplex are identical, under the given relabelling, for all faces of all dimensions k ≤ subdim.
other | the simplex to compare against this. |
p | a mapping from the vertices of this simplex to the vertices of other. |
true
if and only if, for every i and every facial dimension k ≤ subdim, k-face number i of this simplex has the same degree as its image in other under the relabelling p.
|
inherited |
Returns a short text representation of this object.
This text should be human-readable, should fit on a single line, and should not end with a newline. Where possible, it should use plain ASCII characters.
__str__()
.
|
inherited |
Returns a short text representation of this object using unicode characters.
Like str(), this text should be human-readable, should fit on a single line, and should not end with a newline. In addition, it may use unicode characters to make the output more pleasant to read. This string will be encoded in UTF-8.