|
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, 0 > * | vertex (int i) const |
| A dimension-specific alias for face<0>(). More...
|
|
Face< dim, 1 > * | edge (int i) const |
| A dimension-specific alias for face<1>(). 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...
|
|
Face< dim, 2 > * | triangle (int i) const |
| A dimension-specific alias for face<2>(). More...
|
|
Face< dim, 3 > * | tetrahedron (int i) const |
| A dimension-specific alias for face<3>(). More...
|
|
Face< dim, 4 > * | pentachoron (int i) const |
| A dimension-specific alias for face<4>(). More...
|
|
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...
|
|
Perm< dim+1 > | vertexMapping (int face) const |
| A dimension-specific alias for faceMapping<0>(). More...
|
|
Perm< dim+1 > | edgeMapping (int face) const |
| A dimension-specific alias for faceMapping<1>(). More...
|
|
Perm< dim+1 > | triangleMapping (int face) const |
| A dimension-specific alias for faceMapping<2>(). More...
|
|
Perm< dim+1 > | tetrahedronMapping (int face) const |
| A dimension-specific alias for faceMapping<3>(). More...
|
|
Perm< dim+1 > | pentachoronMapping (int face) const |
| A dimension-specific alias for faceMapping<4>(). 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...
|
|
template<int dim>
class regina::Face< dim, 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).
Simplices do not support value semantics: they cannot be copied, swapped, or manually constructed. Their location in memory defines them, and they are often passed and compared by pointer. End users are never responsible for their memory management; this is all taken care of by the Triangulation to which they belong.
- Python
- Python does not support templates. Instead this class can be used by appending the dimension as a suffix (e.g., Simplex2 and Simplex3 for dimensions 2 and 3).
- Template Parameters
-
dim | the dimension of the underlying triangulation. This must be between 2 and 15 inclusive. |
template<int dim>
template<int subdim>
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.
Specifically:
- Suppose several subdim-faces of several top-dimensional simplices are identified within the overall triangulation. Then we call this a single "<i>subdim</i>-face of the triangulation", and arbitrarily label its vertices (0, ..., subdim).
- Now let F denote the subdim-face of the triangulation that corresponds to subdim-face number face of this simplex. Then this routine returns a map from vertices (0, ..., subdim) of F to the corresponding vertex numbers of this simplex.
- In particular, if this routine returns the permutation p, then the images p[0,...,subdim] will be some permutation of the vertices Face<dim, subdim>::ordering[0,...,subdim].
- If F also appears as face number k in some other simplex s, then for each i in the range 0 ≤ i ≤ subdim, vertex
p[i]
of this simplex will be identified with vertex s.faceMapping(k)[i]
of simplex s.
If the link of the underlying subdim-face is orientable, then this permutation maps the remaining numbers (subdim+1, ..., dim) to the remaining vertex numbers of this simplex in a manner that preserves orientation as you walk through the many different simplices that contain the same underlying subdim-face. Specifically:
- The images of (subdim+1, ..., dim) under this permutation imply an orientation for the (dim - subdim - 1)-face opposite F in this simplex. These orientations will be consistent for all simplices containing F.
- For faces of codimension two (e.g., edges in a 3-manifold triangulation), this orientation condition is even stronger. Here the link of the face F must be a path (for a boundary face) or a cycle (for an internal face). In each simplex we can form a directed edge from the image of dim-1 to the image of dim under this permutation, and together these directed edges form a directed path or cycle that follows the link of the face F. Moreover, an iteration through the corresponding FaceEmbedding<dim, subdim> objects in order from
F.begin()
to F.end()
, will follow this directed path in order from start to end. (In the case where the link of F is a cycle, the start point in the list of FaceEmbedding objects will be arbitrary.)
Note that, even if the link is orientable, there are still arbitrary decisions to be made for the images of (subdim+1, ..., dim), since there will always be (dim-subdim)!/2 possible mappings that yield the correct orientation.
If this simplex (and therefore the face F) belongs to an orientable component of the triangulation, then there will also be connections between faceMapping() and the orientations of the top-dimensional simplices (as returned by orientation()):
- If subdim is less than (dim - 1), then the sign of the permutation returned by faceMapping() will always be equal to the orientation of this simplex.
- If subdim is equal to (dim - 1), then the face F can only belong to either one or two top-dimensional simplices; let s0 and s1 be the simplices corresponding to
F.embedding(0)
and (if it exists) F.embedding(1)
respectively. Then in the simplex s0, the sign of the faceMapping() permutation will match the orientation of s0, and in s1 (if it exists), the sign of the faceMapping() permutation will be negative the orientation of s1.
- Note
- This routine returns the same permutation as FaceEmbedding<dim, subdim>::vertices(), in the context of the FaceEmbedding<dim, subdim> object that refers to subdim-face number face of this simplex.
- Python
- Python does not support templates. Instead, Python users should call this function in the form
faceMapping(subdim, face)
; that is, the template parameter subdim becomes the first argument of the function.
- Template Parameters
-
subdim | the dimension of the subface to examine. This must be between 0 and (dim - 1) inclusive. |
- Parameters
-
face | the subdim-face of this simplex to examine. This should be between 0 and (dim+1 choose subdim+1)-1 inclusive. |
- Returns
- a mapping from the vertices of the underlying subdim-face of the triangulation to the vertices of this simplex.
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.
When the skeletal structure of a triangulation is first computed, a maximal forest in the dual 1-skeleton of the triangulation is also constructed. Each dual edge in this maximal forest represents a (dim-1)-face of the (primal) triangulation.
This maximal forest will remain fixed until the triangulation changes, at which point it will be recomputed (as will all other skeletal objects, such as connected components and so on). There is no guarantee that, when it is recomputed, the maximal forest will use the same dual edges as before.
This routine identifies which (dim-1)-faces of the triangulation belong to the dual forest. Because it lives in the Simplex class, this routine can even be used for those dimensions that do not have explicit classes for (dim-1)-faces of the triangulation.
If the skeleton has already been computed, then this routine is very fast (since it just returns a precomputed answer).
- Parameters
-
facet | the facet of this simplex that we are examining. This must be between 0 and dim inclusive. |
- Returns
true
if and only if the given facet of this simplex corresponds to a dual edge in the maximal forest chosen for the dual 1-skeleton.