Regina Calculation Engine
|
Represents a triangle in the skeleton of a 3-manifold triangulation. More...
#include <triangulation/ntriangle.h>
Public Types | |
enum | Type { UNKNOWN_TYPE = 0, TRIANGLE = 1, SCARF = 2, PARACHUTE = 3, CONE = 4, MOBIUS = 5, HORN = 6, DUNCEHAT = 7, L31 = 8 } |
The type of a triangle, which indicates how the vertices and edges of the triangle are identified together. More... | |
Public Member Functions | |
bool | isBoundary () const |
Determines if this triangle lies entirely on the boundary of the triangulation. More... | |
bool | inMaximalForest () const |
Determines whether this triangle represents a dual edge in the maximal forest that has been chosen for the dual 1-skeleton of the triangulation. More... | |
Type | type () |
Returns a description of the triangle type. More... | |
REGINA_DEPRECATED Type | getType () |
Deprecated routine that returns a description of the triangle type. More... | |
int | subtype () |
Return the triangle vertex or triangle edge that plays a special role for the triangle type of this triangle. More... | |
REGINA_DEPRECATED int | getSubtype () |
Deprecated routine that returns the triangle vertex or triangle edge that plays a special role for the triangle type of this triangle. More... | |
bool | isMobiusBand () |
Determines whether this triangle is wrapped up to form a Mobius band. More... | |
bool | isCone () |
Determines whether this triangle is wrapped up to form a cone. More... | |
NBoundaryComponent * | boundaryComponent () const |
Returns the boundary component of the triangulation to which this triangle belongs. More... | |
REGINA_DEPRECATED NBoundaryComponent * | getBoundaryComponent () const |
Deprecated routine that returns the boundary component of the triangulation to which this triangle belongs. 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 | index () const |
Returns the index of this face within the underlying triangulation. More... | |
Triangulation< dim > * | triangulation () const |
Returns the triangulation to which this face belongs. More... | |
REGINA_DEPRECATED Triangulation< dim > * | getTriangulation () const |
Deprecated routine that returns the triangulation to which this face belongs. More... | |
Component< dim > * | component () const |
Returns the component of the triangulation to which this face belongs. More... | |
REGINA_DEPRECATED Component< dim > * | getComponent () const |
Deprecated routine that returns the component of the triangulation to which this face belongs. More... | |
Face< dim, lowerdim > * | face (int face) const |
Returns the lowerdim-face of the underlying triangulation that appears as the given lowerdim-dimensional subface of this face. More... | |
NPerm< dim+1 > | faceMapping (int face) const |
Examines the given lowerdim-dimensional subface of this face, and returns the mapping between the underlying lowerdim-face of the triangulation and the individual vertices of this face. More... | |
size_t | degree () const |
Returns the degree of this face. More... | |
REGINA_DEPRECATED size_t | getDegree () const |
Deprecated routine that 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... | |
REGINA_DEPRECATED const FaceEmbedding< dim, dim - codim > & | getEmbedding (size_t index) const |
Deprecated routine that returns one of the ways in which this face appears within a top-dimensional simplex of the underlying triangulation. 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 | isValid () const |
Determines if this face is valid. More... | |
bool | hasBadIdentification () const |
Determines if this face is identified with itself under a non-identity permutation. More... | |
bool | hasBadLink () const |
Determines if this face does not have an appropriate link. More... | |
bool | isLinkOrientable () const |
Determines if the link of this face is orientable. More... | |
size_t | markedIndex () const |
Returns the index at which this object is stored in an NMarkedVector. 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... | |
REGINA_DEPRECATED std::string | toString () const |
A deprecated alias for str(). More... | |
REGINA_DEPRECATED std::string | toStringLong () const |
A deprecated alias for detail(). More... | |
Static Public Member Functions | |
static NPerm< dim+1 > | ordering (unsigned face) |
Given a subdim-face number within a dim-dimensional simplex, returns the corresponding canonical ordering of the simplex vertices. More... | |
static unsigned | faceNumber (NPerm< dim+1 > vertices) |
Identifies which subdim-face in a dim-dimensional simplex is represented by the first (subdim + 1) elements of the given permutation. More... | |
static bool | containsVertex (unsigned face, unsigned vertex) |
Tests whether the given subdim-face of a dim-dimensional simplex contains the given vertex of the simplex. More... | |
Static Public Attributes | |
static constexpr int | nFaces |
The total number of subdim-dimensional faces in each dim-dimensional simplex. More... | |
Protected Member Functions | |
void | push_back (const FaceEmbedding< dim, dim - codim > &emb) |
Internal routine to help build the skeleton of a triangulation. More... | |
void | markBadIdentification () |
Marks this face as having a non-identity self-identification. More... | |
void | markBadLink () |
Marks this face as having a bad link. More... | |
void | markLinkNonorientable () |
Marks the link of this face as non-orientable. More... | |
Friends | |
class | Triangulation< 3 > |
class | detail::TriangulationBase< 3 > |
Represents a triangle in the skeleton of a 3-manifold triangulation.
This is a specialisation of the generic Face class template; see the documentation for Face for a general overview of how this class works.
These specialisations for Regina's standard dimensions offer significant extra functionality.
enum regina::Face< 3, 2 >::Type |
The type of a triangle, which indicates how the vertices and edges of the triangle are identified together.
Here the vertices of a triangle are considered unlabelled (so a relabelling will not change the triangle type).
|
inlineinherited |
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.
|
inlineinherited |
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 boundary component of the triangulation to which this triangle belongs.
|
inlineinherited |
Returns the component of the triangulation to which this face belongs.
|
inlineinherited |
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.
|
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.
|
inlineinherited |
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. |
|
inlineinherited |
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.
|
inlineinherited |
Returns the lowerdim-face of the underlying triangulation that appears as the given lowerdim-dimensional subface of this face.
The argument face must represent a lowerdim-face number within a subdim-simplex. This lowerdim-face number will be interpreted with respect to the inherent labelling (0, ..., subdim) of the vertices of this subdim-face. See FaceEmbedding<dim, subdim>::vertices() for details on how these map to the vertex numbers of the dim-dimensional simplices that contain this face in the overall triangulation.
See FaceNumbering<subdim, lowerdim> for the conventions of how lowerdim-faces are numbered within a subdim-simplex.
face(lowerdim, face)
; that is, the template parameter lowerdim becomes the first argument of the function.face | the lowerdim-face of this subdim-face to examine. This should be between 0 and (subdim+1 choose lowerdim+1)-1 inclusive. |
|
inherited |
Examines the given lowerdim-dimensional subface of this face, and returns the mapping between the underlying lowerdim-face of the triangulation and the individual vertices of this face.
The argument face must represent a lowerdim-face number within a subdim-simplex. This lowerdim-face number will be interpreted with respect to the inherent labelling (0, ..., subdim) of the vertices of this subdim-face. See FaceEmbedding<dim, subdim>::vertices() for details on how these map to the vertex numbers of the dim-dimensional simplices that contain this face in the overall triangulation.
Let F denote this subdim-face of the triangulation, and let L denote the lowerdim-face of the triangulation that corresponds to the given subface of F. Then the permutation returned by this routine maps the vertex numbers (0, ..., lowerdim) of L to the corresponding vertex numbers of F. This is with respect to the inherent labellings (0, ..., lowerdim) and (0, ..., subdim) of the vertices of L and F respectively.
In particular, if this routine returns the permutation p, then the images p[0,...,lowerdim] will be some permutation of the vertices Face<subdim, lowerdim>::ordering(face)[0,...,lowerdim].
This routine differs from Simplex<dim>::faceMapping<lowerdim>() in how it handles the images of (lowerdim+1, ..., dim):
See FaceNumbering<subdim, lowerdim> for the conventions of how lowerdim-faces are numbered within a subdim-simplex.
faceMapping(lowerdim, face)
; that is, the template parameter lowerdim becomes the first argument of the function.face | the lowerdim-face of this subdim-face to examine. This should be between 0 and (subdim+1 choose lowerdim+1)-1 inclusive. |
|
inlineinherited |
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.
|
inline |
Deprecated routine that returns the boundary component of the triangulation to which this triangle belongs.
|
inlineinherited |
Deprecated routine that returns the component of the triangulation to which this face belongs.
See component() for further details.
|
inlineinherited |
Deprecated routine that returns the degree of this face.
See degree() for further details.
|
inlineinherited |
Deprecated routine that returns one of the ways in which this face appears within a top-dimensional simplex of the underlying triangulation.
See embedding() for further details.
|
inline |
Deprecated routine that returns the triangle vertex or triangle edge that plays a special role for the triangle type of this triangle.
|
inlineinherited |
Deprecated routine that returns the triangulation to which this face belongs.
See triangulation() for further details.
|
inline |
Deprecated routine that returns a description of the triangle type.
|
inherited |
Determines if this face is identified with itself under a non-identity permutation.
For example, if this face is an edge then this routine tests whether the edge is identified with itself in reverse.
Such a face will always be marked as invalid. Note that, for standard dimensions dim, there are other types of invalid faces also. See isValid() for a full discussion of what it means for a face to be valid.
true
if and only if this face is identified with itself under a non-identity permutation.
|
inherited |
Determines if this face does not have an appropriate link.
See condition (2) in the documentation for isValid() for a full description of what "appropriate" means.
This routine is only available where dim is one of Regina's standard dimensions, since testing this condition in arbitrary dimensions is undecidable. For higher dimensions dim, this routine is not present.
A face whose link is not appropriate will always be marked as invalid. Note that there are other types of invalid faces also. See isValid() for a full discussion of what it means for a face to be valid.
true
if and only if the link of this face is not appropriate.
|
inlineinherited |
Returns the index of this face within the underlying triangulation.
This is identical to calling the deprecated function triangulation()->vertexIndex(this)
for faces of dimension subdim = 1, or triangulation()->edgeIndex(this)
for faces of dimension subdim = 2, or so on.
|
inline |
Determines whether this triangle represents a dual edge in the maximal forest that has been chosen for the dual 1-skeleton of the 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 triangle 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 triangle 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 triangle represents a dual edge in the maximal forest.
|
inline |
Determines if this triangle lies entirely on the boundary of the triangulation.
true
if and only if this triangle lies on the boundary.
|
inline |
Determines whether this triangle is wrapped up to form a cone.
Note that several different triangle types (as returned by type()) can produce this result. Note also that a triangle can be both a Mobius band and a cone.
true
if and only if this triangle is a cone.
|
inherited |
Determines if the link of this face is orientable.
This routine is fast: it uses pre-computed information, and does not need to build a full triangulation of the link.
true
if and only if the link is orientable.
|
inline |
Determines whether this triangle is wrapped up to form a Mobius band.
Note that several different triangle types (as returned by type()) can produce this result. Note also that a triangle can be both a Mobius band and a cone.
true
if and only if this triangle is a Mobius band.
|
inherited |
Determines if this face is valid.
There are several conditions that might make a subdim-face of a dim-dimensional triangulation invalid:
Condition (1) is tested for all dimensions subdim and dim. Condition (2) is more difficult, since it relies on undecidable problems. As a result, (2) is only tested when dim is one of Regina's standard dimensions.
If this face is invalid, then it is possible to find out why. In non-standard dimensions, this must mean that the face fails condition (1) above. In standard dimensions, you can call the functions hasBadIdentification() and/or hasBadLink() to determine whether the failure is due to conditions (1) or (2) respectively.
true
if and only if this face is valid according to both conditions (1) and (2) above; for non-standard dimensions dim, returns true
if and only if this face is valid according to condition (1).
|
protectedinherited |
Marks this face as having a non-identity self-identification.
|
protectedinherited |
Marks this face as having a bad link.
|
inlineinherited |
Returns the index at which this object is stored in an NMarkedVector.
If this object does not belong to an NMarkedVector, the return value is undefined.
|
protectedinherited |
Marks the link of this face as non-orientable.
|
inlineprotectedinherited |
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. |
|
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__()
.
|
inline |
Return the triangle vertex or triangle edge that plays a special role for the triangle type of this triangle.
Note that this routine is only relevant for some triangle types. The triangle type is returned by type().
|
inherited |
A deprecated alias for str().
|
inherited |
A deprecated alias for detail().
|
inlineinherited |
Returns the triangulation to which this face belongs.
Type regina::Face< 3, 2 >::type | ( | ) |
Returns a description of the triangle type.
This will be one of the eight shapes described by the Type enumeration, indicating how the edges and vertices of the triangle are identified.
|
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.
void regina::Face< 3, 2 >::writeTextLong | ( | std::ostream & | out | ) | const |
Writes a detailed text representation of this object to the given output stream.
out | the output stream to which to write. |
|
inline |
Writes a short text representation of this object to the given output stream.
out | the output stream to which to write. |
|
staticinherited |
The total number of subdim-dimensional faces in each dim-dimensional simplex.