Regina Calculation Engine
|
Represents a component of a triangulation. More...
#include <triangulation/ncomponent.h>
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... | |
NTetrahedron * | getTetrahedron (unsigned long index) const |
Returns the requested tetrahedron in this component. More... | |
NTetrahedron * | getSimplex (unsigned long index) const |
A dimension-agnostic alias for getTetrahedron(). More... | |
NTriangle * | getTriangle (unsigned long index) const |
Returns the requested triangle in this component. More... | |
NTriangle * | getFace (unsigned long index) const |
A deprecated alias for getTriangle(). More... | |
NEdge * | getEdge (unsigned long index) const |
Returns the requested edge in this component. More... | |
NVertex * | getVertex (unsigned long index) const |
Returns the requested vertex in this component. More... | |
NBoundaryComponent * | getBoundaryComponent (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... | |
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.
|
inlinevirtual |
Default destructor.
|
inherited |
Returns the output from writeTextLong() as a string.
|
inline |
Returns the requested boundary component in this component.
index | the 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. |
|
inline |
Returns the requested edge in this component.
index | the 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. |
|
inline |
A deprecated alias for getTriangle().
This routine returns the requested triangular face in this component. See getTriangle() for further details.
index | the 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. |
|
inline |
Returns the number of boundary components in this component.
|
inline |
Returns the number of boundary triangles in this component.
|
inline |
Returns the number of edges in this component.
|
inline |
A deprecated alias for getNumberOfTriangles().
This routine returns the number of triangular faces in this component. See getNumberOfTriangles() for further details.
|
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.
|
inline |
Returns the number of tetrahedra in this component.
|
inline |
Returns the number of triangles in this component.
|
inline |
Returns the number of vertices in this component.
|
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.
|
inline |
Returns the requested tetrahedron in this component.
index | the 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. |
|
inline |
Returns the requested triangle in this component.
index | the 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. |
|
inline |
Returns the requested vertex in this component.
index | the 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. |
|
inline |
Returns the index of this component in the underlying triangulation.
This is identical to calling getTriangulation()->componentIndex(this)
.
|
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.
true
if and only if this component is closed.
|
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().
true
if and only if this component is ideal.
|
inline |
Determines if this component is orientable.
true
if and only if this component is orientable.
|
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.
|
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.
out | the output stream to which to write. |
Implements regina::ShareableObject.
|
friend |
Allow access to private members.