Regina Calculation Engine
|
Helper class for storing all the ways in which a given face of codimension codim in a dim-dimensional triangulation appears within the various top-dimensional simplices. More...
#include <triangulation/detail/face.h>
Public Member Functions | |
size_t | degree () const |
Returns the degree of this face. More... | |
const FaceEmbedding< dim, dim - codim > & | embedding (size_t index) const |
Returns one of the ways in which this face appears within a top-dimensional simplex of the underlying triangluation. More... | |
std::vector< FaceEmbedding< dim, dim - codim > >::const_iterator | begin () const |
A begin function for iterating through all appearances of this face within the various top-dimensional simplices of the underlying triangulation. More... | |
std::vector< FaceEmbedding< dim, dim - codim > >::const_iterator | end () const |
An end function for iterating through all appearances of this face within the various top-dimensional simplices of the underlying triangulation. More... | |
const FaceEmbedding< dim, dim - codim > & | front () const |
Returns the first appearance of this face within a top-dimensional simplex of the underlying triangluation. More... | |
const FaceEmbedding< dim, dim - codim > & | back () const |
Returns the last appearance of this face within a top-dimensional simplex of the underlying triangluation. More... | |
bool | inMaximalForest () const |
Determines whether a codimension-1-face represents a dual edge in the maximal forest that has been chosen for the dual 1-skeleton of the triangulation. More... | |
Protected Member Functions | |
void | push_back (const FaceEmbedding< dim, dim - codim > &emb) |
Internal routine to help build the skeleton of a triangulation. More... | |
Helper class for storing all the ways in which a given face of codimension codim in a dim-dimensional triangulation appears within the various top-dimensional simplices.
In essence, this class provides the data structures which which a Face object stores its list of corresponding FaceEmbedding objects. All the routines in this class are inherited by Face, and so end users should not need to refer to FaceStorage directly.
The reason these data structrues belong to a separate class FaceStorage (as opposed to be being integrated directly into Face or FaceBase) is so that Regina can use different data structures for different codimensions.
See the Face and FaceEmbedding template class notes for further information.
dim | the dimension of the underlying triangulation. This must be between 2 and 15 inclusive. |
codim | the codimension of the faces of the underlying triangulation. This must be between 1 and dim inclusive. |
|
inline |
Returns the last appearance of this face within a top-dimensional simplex of the underlying triangluation.
This is equivalent to calling embedding(degree()-1)
.
In most cases, the ordering of appearances is arbitrary. The exception is for codimension 2, where the appearances of a face are ordered in a way that follows the link around the face (which in codimension 2 is always a path or a cycle). In particular, for a boundary face of codimension 2, both front() and back() will refer to the two appearances of this face on the (dim-1)-dimensional boundary.
|
inline |
A begin function for iterating through all appearances of this face within the various top-dimensional simplices of the underlying triangulation.
In most cases, the ordering of appearances is arbitrary. The exception is for codimension 2, where these appearances are ordered in a way that follows the link around the face (which in codimension 2 is always a path or a cycle).
An iteration from begin() to end() will run through degree() appearances in total.
|
inline |
Returns the degree of this face.
This is the number of different ways in which the face appears within the various top-dimensional simplices of the underlying triangulation.
Note that if this face appears multiple times within the same top-dimensional simplex, then it will be counted multiple times by this routine.
|
inline |
Returns one of the ways in which this face appears within a top-dimensional simplex of the underlying triangluation.
For convenience, you can also use begin() and end() to iterate through all such appearances.
In most cases, the ordering of appearances is arbitrary. The exception is for codimension 2, where these appearances are ordered in a way that follows the link around the face (which in codimension 2 is always a path or a cycle).
index | the index of the requested appearance. This must be between 0 and degree()-1 inclusive. |
|
inline |
An end function for iterating through all appearances of this face within the various top-dimensional simplices of the underlying triangulation.
In most cases, the ordering of appearances is arbitrary. The exception is for codimension 2, where these appearances are ordered in a way that follows the link around the face (which in codimension 2 is always a path or a cycle).
An iteration from begin() to end() will run through degree() appearances in total.
|
inline |
Returns the first appearance of this face within a top-dimensional simplex of the underlying triangluation.
This is equivalent to calling *begin()
, or embedding(0)
.
In most cases, the ordering of appearances is arbitrary. The exception is for codimension 2, where the appearances of a face are ordered in a way that follows the link around the face (which in codimension 2 is always a path or a cycle). In particular, for a boundary face of codimension 2, both front() and back() will refer to the two appearances of this face on the (dim-1)-dimensional boundary.
bool regina::detail::FaceStorage< dim, codim >::inMaximalForest | ( | ) | const |
Determines whether a codimension-1-face represents a dual edge in the maximal forest that has been chosen for the dual 1-skeleton of the triangulation.
This routine is only available for faces of codimension 1; that is, (dim-1)-faces of a dim-dimensional 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 whether this (dim-1)-face belongs to the dual forest. In this sense it performs a similar role to Simplex::facetInMaximalForest(), but this routine is typically easier to use.
If the skeleton has already been computed, then this routine is very fast (since it just returns a precomputed answer).
true
if and only if this (dim-1)-face represents a dual edge in the maximal forest.
|
inlineprotected |
Internal routine to help build the skeleton of a triangulation.
This routine pushes the given object onto the end of the internal list of appearances of this face within top-dimensional simplices.
emb | the appearance to push onto the end of the internal list. |