Regina Calculation Engine
|
Represents a vertex in the skeleton of a 3-manifold triangulation. More...
#include <triangulation/nvertex.h>
Public Types | |
enum | LinkType { SPHERE = 1, DISC = 2, TORUS = 3, KLEIN_BOTTLE = 4, NON_STANDARD_CUSP = 5, INVALID = 6, NON_STANDARD_BDRY = 6 } |
Categorises the possible links of a vertex into a small number of common types. More... | |
Public Member Functions | |
~Face () | |
Default destructor. More... | |
NBoundaryComponent * | boundaryComponent () const |
Returns the boundary component of the triangulation to which this vertex belongs. More... | |
REGINA_DEPRECATED NBoundaryComponent * | getBoundaryComponent () const |
Deprecated routine that returns the boundary component of the triangulation to which this vertex belongs. More... | |
LinkType | link () const |
Returns a broad categorisation of the link of the vertex. More... | |
REGINA_DEPRECATED LinkType | getLink () const |
Deprecated routine that returns a broad categorisation of the link of the vertex. More... | |
const Dim2Triangulation * | buildLink () const |
Returns a full 2-manifold triangulation describing the link of this vertex. More... | |
Dim2Triangulation * | buildLinkDetail (bool labels=true, NIsomorphism **inclusion=0) const |
Returns a full 2-manifold triangulation describing the link of this vertex. More... | |
bool | isLinkClosed () const |
Determines if the link of this vertex is closed. More... | |
bool | isIdeal () const |
Determines if this vertex is an ideal vertex. More... | |
bool | isBoundary () const |
Determines if this vertex lies on the boundary of the triangulation. More... | |
bool | isStandard () const |
Determines if this vertex is standard. More... | |
REGINA_INLINE_REQUIRED long | linkEulerChar () const |
Returns the Euler characteristic of the vertex link. More... | |
REGINA_DEPRECATED long | getLinkEulerChar () const |
Deprecated routine that returns the Euler characteristic of the vertex link. More... | |
REGINA_DEPRECATED long | getLinkEulerCharacteristic () const |
A deprecated alias for linkEulerChar(). 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 vertex 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, 0 >::LinkType |
Categorises the possible links of a vertex into a small number of common types.
Here a vertex link is considered only up to its topology (not the combinatorics of its triangulation).
Enumerator | |
---|---|
SPHERE | Specifies a vertex link that is a sphere. In other words, the vertex is internal. |
DISC | Specifies a vertex link that is a disc. In other words, the vertex lies on a real boundary component. |
TORUS | Specifies a vertex link that is a torus. In other words, this is an ideal vertex representing a torus cusp. |
KLEIN_BOTTLE | Specifies a vertex link that is a Klein bottle. In other words, this is an ideal vertex representing a Klein bottle cusp. |
NON_STANDARD_CUSP | Specifies a vertex link that is closed and is not a sphere, torus or Klein bottle. In other words, this is an ideal vertex but not one of the standard ideal vertex types. |
INVALID | Specifies a vertex link that has boundary and is not a disc. In other words, this vertex makes the triangulation invalid. |
NON_STANDARD_BDRY |
|
regina::Face< 3, 0 >::~Face | ( | ) |
Default destructor.
|
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 vertex belongs.
See the note in the NBoundaryComponent overview regarding what happens if the vertex link is a multiply punctured surface. Note that this makes both the vertex and the triangulation invalid.
An ideal vertex will have its own individual boundary component to which it belongs.
|
inline |
Returns a full 2-manifold triangulation describing the link of this vertex.
This routine is fast (it uses a pre-computed triangulation if possible). The downside is that the triangulation is read-only, and does not contain any information on how the triangles in the link correspond to tetrahedra in the original triangulation (though this is easily deduced; see below). If you want a writable triangulation, or one with this extra information, then call buildLinkDetail() instead.
The triangulation of the vertex link is built as follows. Let i lie between 0 and degree()-1 inclusive, let tet represent embedding(i).tetrahedron()
, and let v represent embedding(i).vertex()
. Then buildLink()->triangle(i)
is the triangle in the vertex link that "slices off" vertex v from tetrahedron tet. In other words, buildLink()->triangle(i)
in the vertex link is parallel to triangle tet->triangle(v)
in the surrounding 3-manifold triangulation.
The vertices of each triangle in the vertex link are numbered as follows. Following the discussion above, suppose that buildLink()->triangle(i)
sits within tet
and is parallel to tet->triangle(v)
. Then vertices 0,1,2 of the triangle in the link will be parallel to vertices 0,1,2 of the corresponding NTriangle. The permutation tet->triangleMapping(v)
will map vertices 0,1,2 of the triangle in the link to the corresponding vertices of tet
(those opposite v
), and will map 3 to v
itself.
This NVertex object will retain ownership of the triangulation that is returned. If you wish to edit the triangulation, you should make a new clone and edit the clone instead.
Dim2Triangulation* regina::Face< 3, 0 >::buildLinkDetail | ( | bool | labels = true , |
NIsomorphism ** | inclusion = 0 |
||
) | const |
Returns a full 2-manifold triangulation describing the link of this vertex.
This routine is heavyweight (it computes a new triangulation each time). The benefit is that the triangulation is writeable, and optionally contain detailed information on how the triangles in the link correspond to tetrahedra in the original triangulation. If you do not need this extra information, consider using the faster buildLink() instead.
See the buildLink() documentation for an explanation of exactly how the triangulation will be constructed.
If labels is passed as true
, each triangle of the new vertex link will be given a text description of the form t (v)
, where t
is the index of the tetrahedron the triangle is from, and v
is the vertex of that tetrahedron that this triangle links.
If inclusion is non-null (i.e., it points to some NIsomorphism pointer p), then it will be modified to point to a new NIsomorphism that describes in detail how the individual triangles of the link sit within tetrahedra of the original triangulation. Specifically, after this routine is called, p->tetImage(i)
will indicate which tetrahedron tet of the 3-manifold triangulation contains the ith triangle of the link. Moreover, p->facePerm(i)
will indicate exactly where the ith triangle sits within tet: it will send 3 to the vertex of t that the triangle links, and it will send 0,1,2 to the vertices of tet that are parallel to vertices 0,1,2 of this triangle.
The triangulation that is returned, as well as the isomorphism if one was requested, will be newly allocated. The caller of this routine is responsible for destroying these objects.
Strictly speaking, this is an abuse of the NIsomorphism class (the domain is a triangulation of the wrong dimension, and the map is not 1-to-1 into the range tetrahedra). We use it anyway, but you should not attempt to call any high-level routines (such as NIsomorphism::apply).
|
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 vertex 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 a broad categorisation of the link of the vertex.
|
inline |
Deprecated routine that returns the Euler characteristic of the vertex link.
|
inline |
A deprecated alias for linkEulerChar().
Returns the Euler characteristic of the vertex link.
This routine does not require a full triangulation of the vertex link, and so can be much faster than calling buildLink().eulerChar().
|
inlineinherited |
Deprecated routine that returns the triangulation to which this face belongs.
See triangulation() for further details.
|
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 if this vertex lies on the boundary of the triangulation.
Ideal vertices are included as being on the boundary. In fact, the only vertices not considered as on the boundary are those whose links are spheres.
true
if and only if this vertex lies on the boundary.
|
inline |
Determines if this vertex is an ideal vertex.
This requires the vertex link to be closed and not a 2-sphere.
true
if and only if this is an ideal vertex.
|
inline |
Determines if the link of this vertex is closed.
true
if and only if the link of this vertex is closed.
|
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 if this vertex is standard.
This requires the vertex link to be a sphere, disc, torus or Klein bottle.
true
if and only if this vertex is standard.
|
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).
|
inline |
Returns a broad categorisation of the link of the vertex.
This considers topological information only, not the combinatorics of how the link is triangulated.
This routine does not require a full triangulation of the vertex link, and so can be much faster than analysing the result of buildLink().
|
inline |
Returns the Euler characteristic of the vertex link.
This routine does not require a full triangulation of the vertex link, and so can be much faster than calling buildLink().eulerChar().
|
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__()
.
|
inherited |
A deprecated alias for str().
|
inherited |
A deprecated alias for detail().
|
inlineinherited |
Returns the triangulation to which this face belongs.
|
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, 0 >::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. |
void regina::Face< 3, 0 >::writeTextShort | ( | std::ostream & | out | ) | const |
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.