Regina Calculation Engine
Public Member Functions | Static Public Attributes | Friends | List of all members
regina::NEdge Class Reference

Represents an edge in the skeleton of a triangulation. More...

#include <triangulation/nedge.h>

Inheritance diagram for regina::NEdge:
regina::ShareableObject regina::NMarkedElement regina::boost::noncopyable

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 NEdgeEmbeddinggetEmbedding (unsigned long index) const
 Returns the requested descriptor from the list returned by getEmbeddings(). More...
 
NTriangulationgetTriangulation () const
 Returns the triangulation to which this edge belongs. More...
 
NComponentgetComponent () const
 Returns the component of the triangulation to which this edge belongs. More...
 
NBoundaryComponentgetBoundaryComponent () const
 Returns the boundary component of the triangulation to which this edge belongs. More...
 
NVertexgetVertex (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...
 

Detailed Description

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.

Constructor & Destructor Documentation

regina::NEdge::~NEdge ( )
inline

Default destructor.

Member Function Documentation

std::string regina::ShareableObject::detail ( ) const
inherited

Returns the output from writeTextLong() as a string.

Returns
a long text representation of this object.
NBoundaryComponent * regina::NEdge::getBoundaryComponent ( ) const
inline

Returns the boundary component of the triangulation to which this edge belongs.

Returns
the boundary component containing this edge, or 0 if this edge does not lie entirely within the boundary of the triangulation.
NComponent * regina::NEdge::getComponent ( ) const
inline

Returns the component of the triangulation to which this edge belongs.

Returns
the component containing this edge.
unsigned long regina::NEdge::getDegree ( ) const
inline

Returns the degree of this edge.

Note that this is identical to getNumberOfEmbeddings().

Returns
the degree of this edge.
const NEdgeEmbedding & regina::NEdge::getEmbedding ( unsigned long  index) const
inline

Returns the requested descriptor from the list returned by getEmbeddings().

Parameters
indexthe index of the requested descriptor. This should be between 0 and getNumberOfEmbeddings()-1 inclusive.
Returns
the requested embedding descriptor.
const std::deque< NEdgeEmbedding > & regina::NEdge::getEmbeddings ( ) const
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.

Python:
This routine returns a python list.
Returns
the list of embedding descriptors.
See also
NEdgeEmbedding
unsigned long regina::NEdge::getNumberOfEmbeddings ( ) const
inline

Returns the number of descriptors in the list returned by getEmbeddings().

Note that this is identical to getDegree().

Returns
the number of embedding descriptors.
NTriangulation * regina::NEdge::getTriangulation ( ) const
inline

Returns the triangulation to which this edge belongs.

Returns
the triangulation containing this edge.
NVertex * regina::NEdge::getVertex ( int  vertex) const
inline

Returns the vertex of the triangulation that corresponds to the given vertex of this edge.

Parameters
vertexthe vertex of this edge to examine. This should be 0 or 1.
Returns
the corresponding vertex of the triangulation.
unsigned long regina::NEdge::index ( ) const
inline

Returns the index of this edge in the underlying triangulation.

This is identical to calling getTriangulation()->edgeIndex(this).

Returns
the index of this edge.
bool regina::NEdge::isBoundary ( ) const
inline

Determines if this edge lies entirely on the boundary of the triangulation.

Returns
true if and only if this edge lies on the boundary.
bool regina::NEdge::isValid ( ) const
inline

Determines if this edge is valid.

An edge is valid if and only if it is not glued to itself in reverse.

Returns
true if and only if this edge is valid.
long regina::NMarkedElement::markedIndex ( ) const
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.

Returns
the index at which this object is stored.
std::string regina::ShareableObject::str ( ) const
inherited

Returns the output from writeTextShort() as a string.

Python:
This implements the __str__() function.
Returns
a short text representation of this object.
std::string regina::ShareableObject::toString ( ) const
inlineinherited

A deprecated alias for str(), which returns the output from writeTextShort() as a string.

Deprecated:
This routine has (at long last) been deprecated; use the simpler-to-type str() instead.
Returns
a short text representation of this object.
std::string regina::ShareableObject::toStringLong ( ) const
inlineinherited

A deprecated alias for detail(), which returns the output from writeTextLong() as a string.

Deprecated:
This routine has (at long last) been deprecated; use the simpler-to-type detail() instead.
Returns
a long text representation of this object.
void regina::NEdge::writeTextLong ( std::ostream &  out) const
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.

Python:
The parameter out does not exist; standard output will be used.
Parameters
outthe output stream to which to write.

Reimplemented from regina::ShareableObject.

void regina::NEdge::writeTextShort ( std::ostream &  out) const
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.

Python:
The parameter out does not exist; standard output will be used.
Parameters
outthe output stream to which to write.

Implements regina::ShareableObject.

Friends And Related Function Documentation

friend class NTriangulation
friend

Allow access to private members.

Member Data Documentation

const int regina::NEdge::edgeNumber[4][4]
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.

const int regina::NEdge::edgeVertex[6][2]
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.

const NPerm4 regina::NEdge::ordering[6]
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().


The documentation for this class was generated from the following file:

Copyright © 1999-2014, The Regina development team
This software is released under the GNU General Public License, with some additional permissions; see the source code for details.
For further information, or to submit a bug or other problem, please contact Ben Burton (bab@debian.org).