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

Represents an edge in the 1-skeleton of a 2-manifold triangulation. More...

#include <dim2/dim2edge.h>

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

Public Member Functions

 ~Dim2Edge ()
 Default destructor. More...
 
unsigned long index () const
 Returns the index of this edge in the underlying triangulation. More...
 
unsigned getNumberOfEmbeddings () const
 Returns the number of descriptors available through getEmbedding(). More...
 
const Dim2EdgeEmbeddinggetEmbedding (unsigned index) const
 Returns the requested descriptor detailing how this edge forms a part of a particular triangle in the triangulation. More...
 
Dim2TriangulationgetTriangulation () const
 Returns the triangulation to which this edge belongs. More...
 
Dim2ComponentgetComponent () const
 Returns the component of the triangulation to which this edge belongs. More...
 
Dim2BoundaryComponentgetBoundaryComponent () const
 Returns the boundary component of the triangulation to which this edge belongs. More...
 
Dim2VertexgetVertex (int vertex) const
 Returns the vertex of the 2-manifold triangulation corresponding to the given vertex of this edge. More...
 
bool isBoundary () const
 Determines if this edge lies entirely on the boundary of the triangulation. 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 NPerm3 ordering [3]
 An array that maps edge numbers within a triangle to the canonical ordering of the individual triangle vertices that form each edge. More...
 

Friends

class Dim2Triangulation
 Allow access to private members. More...
 

Detailed Description

Represents an edge in the 1-skeleton of a 2-manifold 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::Dim2Edge::~Dim2Edge ( )
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.
Dim2BoundaryComponent * regina::Dim2Edge::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.
Dim2Component * regina::Dim2Edge::getComponent ( ) const
inline

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

Returns
the component containing this edge.
const Dim2EdgeEmbedding & regina::Dim2Edge::getEmbedding ( unsigned  index) const
inline

Returns the requested descriptor detailing how this edge forms a part of a particular triangle in the triangulation.

Note that if this edge represents multiple edges of a particular triangle, then there will be multiple embedding descriptors available regarding that triangle.

Parameters
indexthe index of the requested descriptor. This should be between 0 and getNumberOfEmbeddings()-1 inclusive.
Returns
the requested embedding descriptor.
unsigned regina::Dim2Edge::getNumberOfEmbeddings ( ) const
inline

Returns the number of descriptors available through getEmbedding().

Note that this number will never be greater than two.

Returns
the number of embedding descriptors.
Dim2Triangulation * regina::Dim2Edge::getTriangulation ( ) const
inline

Returns the triangulation to which this edge belongs.

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

Returns the vertex of the 2-manifold triangulation corresponding to the given vertex of this edge.

Parameters
vertexthe vertex of this edge to examine. This should be either 0 or 1.
Returns
the corresponding vertex of the 2-manifold triangulation.
unsigned long regina::Dim2Edge::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::Dim2Edge::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.
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::Dim2Edge::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::Dim2Edge::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 Dim2Triangulation
friend

Allow access to private members.

Member Data Documentation

const NPerm3 regina::Dim2Edge::ordering[3]
static

An array that maps edge numbers within a triangle to the canonical ordering of the individual triangle vertices that form each edge.

This means that the vertices of edge i in a triangle are, in canonical order, ordering[i][0,1]. As an immediate consequence, we obtain ordering[i][2] == i.

Regina defines canonical order to be increasing order. That is, ordering[i][0] < ordering[i][1].

This table does not describe the mapping from specific edges within a triangulation into individual triangles (for that, see Dim2Triangle::getEdgeMapping() instead). This table merely provides a neat and consistent way of listing the vertices of any given edge of a triangle.


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).