Regina Calculation Engine
|
Represents an edge in the skeleton of a triangulation. More...
#include <triangulation/nedge.h>
Public Member Functions | |
~NEdge () | |
Default destructor. More... | |
unsigned long | index () const |
Returns the index of this edge in the underlying triangulation. More... | |
const std::deque < NEdgeEmbedding > & | getEmbeddings () const |
Returns the list of descriptors detailing how this edge forms a part of various tetrahedra in the triangulation. More... | |
unsigned long | getNumberOfEmbeddings () const |
Returns the number of descriptors in the list returned by getEmbeddings(). More... | |
const NEdgeEmbedding & | getEmbedding (unsigned long index) const |
Returns the requested descriptor from the list returned by getEmbeddings(). More... | |
NTriangulation * | getTriangulation () const |
Returns the triangulation to which this edge belongs. More... | |
NComponent * | getComponent () const |
Returns the component of the triangulation to which this edge belongs. More... | |
NBoundaryComponent * | getBoundaryComponent () const |
Returns the boundary component of the triangulation to which this edge belongs. More... | |
NVertex * | getVertex (int vertex) const |
Returns the vertex of the triangulation that corresponds to the given vertex of this edge. More... | |
unsigned long | getDegree () const |
Returns the degree of this edge. More... | |
bool | isBoundary () const |
Determines if this edge lies entirely on the boundary of the triangulation. More... | |
bool | isValid () const |
Determines if this edge is valid. More... | |
void | writeTextShort (std::ostream &out) const |
Writes this object in short text format to the given output stream. More... | |
void | writeTextLong (std::ostream &out) const |
Writes this object in long text format to the given output stream. More... | |
long | markedIndex () const |
Returns the index at which this object is stored in an NMarkedVector. More... | |
Input and Output | |
std::string | str () const |
Returns the output from writeTextShort() as a string. More... | |
std::string | toString () const |
A deprecated alias for str(), which returns the output from writeTextShort() as a string. More... | |
std::string | detail () const |
Returns the output from writeTextLong() as a string. More... | |
std::string | toStringLong () const |
A deprecated alias for detail(), which returns the output from writeTextLong() as a string. More... | |
Static Public Attributes | |
static const int | edgeNumber [4][4] |
A table that maps vertices of a tetrahedron to edge numbers. More... | |
static const int | edgeVertex [6][2] |
A table that maps edges of a tetrahedron to vertex numbers. More... | |
static const NPerm4 | ordering [6] |
An array that maps edge numbers within a tetrahedron to the canonical ordering of the individual tetrahedron vertices that form each edge. More... | |
Friends | |
class | NTriangulation |
Allow access to private members. More... | |
Represents an edge in the skeleton of a triangulation.
Edges are highly temporary; once a triangulation changes, all its edge objects will be deleted and new ones will be created.
|
inline |
Default destructor.
|
inherited |
Returns the output from writeTextLong() as a string.
|
inline |
Returns the boundary component of the triangulation to which this edge belongs.
|
inline |
Returns the component of the triangulation to which this edge belongs.
|
inline |
Returns the degree of this edge.
Note that this is identical to getNumberOfEmbeddings().
|
inline |
Returns the requested descriptor from the list returned by getEmbeddings().
index | the index of the requested descriptor. This should be between 0 and getNumberOfEmbeddings()-1 inclusive. |
|
inline |
Returns the list of descriptors detailing how this edge forms a part of various tetrahedra in the triangulation.
Note that if this edge represents multiple edges of a particular tetrahedron, then there will be multiple embedding descriptors in the list regarding that tetrahedron.
These embedding descriptors will be stored in order in the list, so that if you run through the list and follow in turn the edges of each tetrahedron defined by the images of (2,3) under NEdgeEmbedding::getVertices(), then you will obtain an ordered chain circling this edge.
|
inline |
Returns the number of descriptors in the list returned by getEmbeddings().
Note that this is identical to getDegree().
|
inline |
Returns the triangulation to which this edge belongs.
|
inline |
Returns the vertex of the triangulation that corresponds to the given vertex of this edge.
vertex | the vertex of this edge to examine. This should be 0 or 1. |
|
inline |
Returns the index of this edge in the underlying triangulation.
This is identical to calling getTriangulation()->edgeIndex(this)
.
|
inline |
Determines if this edge lies entirely on the boundary of the triangulation.
true
if and only if this edge lies on the boundary.
|
inline |
Determines if this edge is valid.
An edge is valid if and only if it is not glued to itself in reverse.
true
if and only if this edge is valid.
|
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.
|
inherited |
Returns the output from writeTextShort() as a string.
__str__()
function.
|
inlineinherited |
A deprecated alias for str(), which returns the output from writeTextShort() as a string.
|
inlineinherited |
A deprecated alias for detail(), which returns the output from writeTextLong() as a string.
|
virtual |
Writes this object in long text format to the given output stream.
The output should provide the user with all the information they could want. The output should be human-readable, should not contain extremely long lines (so users can read the output in a terminal), and should end with a final newline.
The default implementation of this routine merely calls writeTextShort() and adds a newline.
out | the output stream to which to write. |
Reimplemented from regina::ShareableObject.
|
inlinevirtual |
Writes this object in short text format to the given output stream.
The output should be human-readable, should fit on a single line, and should not end with a newline.
out | the output stream to which to write. |
Implements regina::ShareableObject.
|
friend |
Allow access to private members.
|
static |
A table that maps vertices of a tetrahedron to edge numbers.
Edges in a tetrahedron are numbered 0,...,5. This table converts vertices to edge numbers; in particular, the edge joining vertices i and j of a tetrahedron is edge number edgeNumber[i][j]
. Here i and j must be distinct, must be between 0 and 3 inclusive, and may be given in any order. The resulting edge number will be between 0 and 5 inclusive.
Note that edge i is always opposite edge 5-i in a tetrahedron.
For reference, Regina assigns edge numbers in lexicographical order. That is, edge 0 joins vertices 0 and 1, edge 1 joins vertices 0 and 2, edge 2 joins vertices 0 and 3, and so on.
This is identical to the old regina::edgeNumber global array. Users are advised to use this NEdge::edgeNumber array instead, since the global regina::edgeNumber is deprecated and will eventually be removed in some future version of Regina.
|
static |
A table that maps edges of a tetrahedron to vertex numbers.
Edges in a tetrahedron are numbered 0,...,5. This table converts edge numbers to vertices; in particular, edge i in a tetrahedron joins vertices edgeVertex[i][0]
and edgeVertex[i][1]
. Here i must be bewteen 0 and 5 inclusive; the resulting vertex numbers will be between 0 and 3 inclusive.
Note that edge i is always opposite edge 5-i in a tetrahedron. It is guaranteed that edgeVertex[i][0]
will always be smaller than edgeVertex[i][1]
.
This is a combination of the old regina::edgeStart and regina::edgeEnd global arrays (where edgeVertex[i][0] == edgeStart[i]
and edgeVertex[i][1] == edgeEnd[i]
). Users are advised to use this NEdge::edgeVertex array instead, since the global regina::edgeStart and regina::edgeEnd arrays are deprecated and will eventually be removed in some future version of Regina.
|
static |
An array that maps edge numbers within a tetrahedron to the canonical ordering of the individual tetrahedron vertices that form each edge.
This means that the vertices of edge i in a tetrahedron are, in canonical order, ordering[i][0,1]
. The images ordering[i][2,3]
are chosen to make each permutation even.
This table does not describe the mapping from specific triangulation edges into individual tetrahedra (for that, see NTetrahedron::getEdgeMapping() instead). This table merely provides a neat and consistent way of listing the vertices of any given tetrahedron edge.
This lookup table replaces the deprecated routine regina::edgeOrdering().