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

Represents a component of a triangulation. More...

#include <triangulation/ncomponent.h>

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

Public Member Functions

virtual ~NComponent ()
 Default destructor. More...
 
unsigned long index () const
 Returns the index of this component in the underlying triangulation. More...
 
unsigned long getNumberOfTetrahedra () const
 Returns the number of tetrahedra in this component. More...
 
unsigned long getNumberOfSimplices () const
 A dimension-agnostic alias for getNumberOfTetrahedra(). More...
 
unsigned long getNumberOfTriangles () const
 Returns the number of triangles in this component. More...
 
unsigned long getNumberOfFaces () const
 A deprecated alias for getNumberOfTriangles(). More...
 
unsigned long getNumberOfEdges () const
 Returns the number of edges in this component. More...
 
unsigned long getNumberOfVertices () const
 Returns the number of vertices in this component. More...
 
unsigned long getNumberOfBoundaryComponents () const
 Returns the number of boundary components in this component. More...
 
NTetrahedrongetTetrahedron (unsigned long index) const
 Returns the requested tetrahedron in this component. More...
 
NTetrahedrongetSimplex (unsigned long index) const
 A dimension-agnostic alias for getTetrahedron(). More...
 
NTrianglegetTriangle (unsigned long index) const
 Returns the requested triangle in this component. More...
 
NTrianglegetFace (unsigned long index) const
 A deprecated alias for getTriangle(). More...
 
NEdgegetEdge (unsigned long index) const
 Returns the requested edge in this component. More...
 
NVertexgetVertex (unsigned long index) const
 Returns the requested vertex in this component. More...
 
NBoundaryComponentgetBoundaryComponent (unsigned long index) const
 Returns the requested boundary component in this component. More...
 
bool isIdeal () const
 Determines if this component is ideal. More...
 
bool isOrientable () const
 Determines if this component is orientable. More...
 
bool isClosed () const
 Determines if this component is closed. More...
 
unsigned long getNumberOfBoundaryTriangles () const
 Returns the number of boundary triangles in this component. 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 NTriangulation
 Allow access to private members. More...
 

Detailed Description

Represents a component of a triangulation.

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

Constructor & Destructor Documentation

regina::NComponent::~NComponent ( )
inlinevirtual

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::NComponent::getBoundaryComponent ( unsigned long  index) const
inline

Returns the requested boundary component in this component.

Parameters
indexthe index of the requested boundary component in this component. This should be between 0 and getNumberOfBoundaryComponents()-1 inclusive. Note that the index of a boundary component in the component need not be the index of the same boundary component in the entire triangulation.
Returns
the requested boundary component.
NEdge * regina::NComponent::getEdge ( unsigned long  index) const
inline

Returns the requested edge in this component.

Parameters
indexthe index of the requested edge in the component. This should be between 0 and getNumberOfEdges()-1 inclusive. Note that the index of an edge in the component need not be the index of the same edge in the entire triangulation.
Returns
the requested edge.
NTriangle * regina::NComponent::getFace ( unsigned long  index) const
inline

A deprecated alias for getTriangle().

This routine returns the requested triangular face in this component. See getTriangle() for further details.

Deprecated:
This routine will be removed in a future version of Regina. Please use getTriangle() instead.
Parameters
indexthe index of the requested triangle in the component. This should be between 0 and getNumberOfTriangles()-1 inclusive. Note that the index of a triangle in the component need not be the index of the same triangle in the entire triangulation.
Returns
the requested triangle.
unsigned long regina::NComponent::getNumberOfBoundaryComponents ( ) const
inline

Returns the number of boundary components in this component.

Returns
the number of boundary components.
unsigned long regina::NComponent::getNumberOfBoundaryTriangles ( ) const
inline

Returns the number of boundary triangles in this component.

Returns
the number of boundary triangles.
unsigned long regina::NComponent::getNumberOfEdges ( ) const
inline

Returns the number of edges in this component.

Returns
the number of edges.
unsigned long regina::NComponent::getNumberOfFaces ( ) const
inline

A deprecated alias for getNumberOfTriangles().

This routine returns the number of triangular faces in this component. See getNumberOfTriangles() for further details.

Deprecated:
This routine will be removed in a future version of Regina. Please use getNumberOfTriangles() instead.
Returns
the number of triangles.
unsigned long regina::NComponent::getNumberOfSimplices ( ) const
inline

A dimension-agnostic alias for getNumberOfTetrahedra().

This is to assist with writing dimension-agnostic code that can be reused to work in different dimensions.

Here "simplex" refers to a top-dimensional simplex (which for 3-manifold triangulations means a tetrahedron).

See getNumberOfTetrahedra() for further information.

unsigned long regina::NComponent::getNumberOfTetrahedra ( ) const
inline

Returns the number of tetrahedra in this component.

Returns
the number of tetrahedra.
unsigned long regina::NComponent::getNumberOfTriangles ( ) const
inline

Returns the number of triangles in this component.

Returns
the number of triangles.
unsigned long regina::NComponent::getNumberOfVertices ( ) const
inline

Returns the number of vertices in this component.

Returns
the number of vertices.
NTetrahedron * regina::NComponent::getSimplex ( unsigned long  index) const
inline

A dimension-agnostic alias for getTetrahedron().

This is to assist with writing dimension-agnostic code that can be reused to work in different dimensions.

Here "simplex" refers to a top-dimensional simplex (which for 3-manifold triangulations means a tetrahedron).

See getTetrahedron() for further information.

NTetrahedron * regina::NComponent::getTetrahedron ( unsigned long  index) const
inline

Returns the requested tetrahedron in this component.

Parameters
indexthe index of the requested tetrahedron in the component. This should be between 0 and getNumberOfTetrahedra()-1 inclusive. Note that the index of a tetrahedron in the component need not be the index of the same tetrahedron in the entire triangulation.
Returns
the requested tetrahedron.
NTriangle * regina::NComponent::getTriangle ( unsigned long  index) const
inline

Returns the requested triangle in this component.

Parameters
indexthe index of the requested triangle in the component. This should be between 0 and getNumberOfTriangles()-1 inclusive. Note that the index of a triangle in the component need not be the index of the same triangle in the entire triangulation.
Returns
the requested triangle.
NVertex * regina::NComponent::getVertex ( unsigned long  index) const
inline

Returns the requested vertex in this component.

Parameters
indexthe index of the requested vertex in the component. This should be between 0 and getNumberOfVertices()-1 inclusive. Note that the index of a vertex in the component need not be the index of the same vertex in the entire triangulation.
Returns
the requested vertex.
unsigned long regina::NComponent::index ( ) const
inline

Returns the index of this component in the underlying triangulation.

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

Returns
the index of this component vertex.
bool regina::NComponent::isClosed ( ) const
inline

Determines if this component is closed.

This is the case if and only if it has no boundary. Note that ideal components are not closed.

Returns
true if and only if this component is closed.
bool regina::NComponent::isIdeal ( ) const
inline

Determines if this component is ideal.

This is the case if and only if it contains an ideal vertex as described by NVertex::isIdeal().

Returns
true if and only if this component is ideal.
bool regina::NComponent::isOrientable ( ) const
inline

Determines if this component is orientable.

Returns
true if and only if this component is orientable.
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::NComponent::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::NComponent::writeTextShort ( std::ostream &  out) const
virtual

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.


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