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

Represents a vertex in the skeleton of a 2-manifold triangulation. More...

#include <dim2/dim2vertex.h>

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

Public Member Functions

unsigned long index () const
 Returns the index of this vertex in the underlying triangulation. More...
 
const std::deque
< Dim2VertexEmbedding > & 
getEmbeddings () const
 Returns the list of descriptors detailing how this vertex forms a part of various triangles in the triangulation. More...
 
unsigned long getNumberOfEmbeddings () const
 Returns the number of descriptors in the list returned by getEmbeddings(). More...
 
const Dim2VertexEmbeddinggetEmbedding (unsigned long index) const
 Returns the requested descriptor from the list returned by getEmbeddings(). More...
 
Dim2TriangulationgetTriangulation () const
 Returns the triangulation to which this vertex belongs. More...
 
Dim2ComponentgetComponent () const
 Returns the component of the triangulation to which this vertex belongs. More...
 
Dim2BoundaryComponentgetBoundaryComponent () const
 Returns the boundary component of the triangulation to which this vertex belongs. More...
 
unsigned long getDegree () const
 Returns the degree of this vertex. More...
 
bool isBoundary () const
 Determines if this vertex lies 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...
 

Friends

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

Detailed Description

Represents a vertex in the skeleton of a 2-manifold triangulation.

Vertices are highly temporary; once a triangulation changes, all its vertex objects will be deleted and new ones will be created.

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::Dim2Vertex::getBoundaryComponent ( ) const
inline

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

Returns
the boundary component containing this vertex, or 0 if this vertex is not on the boundary of the triangulation.
Dim2Component * regina::Dim2Vertex::getComponent ( ) const
inline

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

Returns
the component containing this vertex.
unsigned long regina::Dim2Vertex::getDegree ( ) const
inline

Returns the degree of this vertex.

Note that this is identical to getNumberOfEmbeddings().

Returns
the degree of this vertex.
const Dim2VertexEmbedding & regina::Dim2Vertex::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< Dim2VertexEmbedding > & regina::Dim2Vertex::getEmbeddings ( ) const
inline

Returns the list of descriptors detailing how this vertex forms a part of various triangles in the triangulation.

Note that if this vertex represents multiple vertices of a particular triangle, then there will be multiple embedding descriptors in the list regarding that triangle.

Python:
This routine returns a python list.
Returns
the list of embedding descriptors.
See also
Dim2VertexEmbedding
unsigned long regina::Dim2Vertex::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.
Dim2Triangulation * regina::Dim2Vertex::getTriangulation ( ) const
inline

Returns the triangulation to which this vertex belongs.

Returns
the triangulation containing this vertex.
unsigned long regina::Dim2Vertex::index ( ) const
inline

Returns the index of this vertex in the underlying triangulation.

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

Returns
the index of this vertex.
bool regina::Dim2Vertex::isBoundary ( ) const
inline

Determines if this vertex lies on the boundary of the triangulation.

Returns
true if and only if this vertex 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::Dim2Vertex::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::Dim2Vertex::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.


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