Regina Calculation Engine
Public Member Functions | Protected Attributes | Friends | List of all members
regina::Component< 3 > Class Template Reference

Represents a connected component of a 3-manifold triangulation. More...

#include <triangulation/dim3.h>

Inheritance diagram for regina::Component< 3 >:
regina::detail::ComponentBase< 3 > regina::alias::FaceOfTriangulation< Component< 3 >, 3 > regina::alias::FacesOfTriangulation< Component< 3 >, 3 > regina::Output< ComponentBase< dim > > regina::alias::Simplices< ComponentBase< dim >, dim > regina::alias::SimplexAt< ComponentBase< dim >, dim, false > regina::MarkedElement

Public Member Functions

template<int subdim>
size_t countFaces () const
 Returns the number of subdim-faces in this component. More...
 
template<int subdim>
const std::vector< Face< 3, subdim > * > & faces () const
 Returns a reference to the list of all subdim-faces in this component. More...
 
template<int subdim>
Face< 3, subdim > * face (size_t index) const
 Returns the requested subdim-face in this component. More...
 
bool isIdeal () const
 Determines if this component is ideal. More...
 
bool isClosed () const
 Determines if this component is closed. More...
 
size_t index () const
 Returns the index of this component within the underlying triangulation. More...
 
size_t size () const
 Returns the number of top-dimensional simplices in this component. More...
 
const std::vector< Simplex< dim > *> & simplices () const
 Returns all top-dimensional simplices in this component. More...
 
Simplex< dim > * simplex (size_t index) const
 Returns the top-dimensional simplex at the given index in this component. More...
 
size_t countBoundaryComponents () const
 Returns the number of boundary components in this component. More...
 
const std::vector< BoundaryComponent< dim > *> & boundaryComponents () const
 Returns all boundary components in this component. More...
 
BoundaryComponent< dim > * boundaryComponent (size_t index) const
 Returns the boundary component at the given index in this component. More...
 
bool isValid () const
 Determines if this component is valid. More...
 
bool isOrientable () const
 Determines if this component is orientable. More...
 
bool hasBoundaryFacets () const
 Determines if this component has any boundary facets. More...
 
size_t countBoundaryFacets () const
 Returns the number of boundary facets in this component. More...
 
void writeTextShort (std::ostream &out) const
 Writes a short text representation of this object to the given output stream. More...
 
void writeTextLong (std::ostream &out) const
 Writes a detailed text representation of this object to the given output stream. More...
 
std::string str () const
 Returns a short text representation of this object. More...
 
std::string utf8 () const
 Returns a short text representation of this object using unicode characters. More...
 
std::string detail () const
 Returns a detailed text representation of this object. More...
 
size_t markedIndex () const
 Returns the index at which this object is stored in an MarkedVector. More...
 

Protected Attributes

bool valid_
 Is this component valid? See Triangulation<dim>::isValid() for details on what this means. More...
 

Friends

class Triangulation< 3 >
 
class detail::TriangulationBase< 3 >
 

Detailed Description

template<>
class regina::Component< 3 >

Represents a connected component of a 3-manifold triangulation.

This is a specialisation of the generic Component class template; see the Component documentation for an overview of how this class works.

This 3-dimensional specialisation contains some extra functionality. In particular, each 3-dimensional component also stores details on lower-dimensional faces (i.e., vertices, edges and triangles).

Member Function Documentation

◆ boundaryComponent()

BoundaryComponent< dim > * regina::detail::ComponentBase< dim >::boundaryComponent ( size_t  index) const
inlineinherited

Returns the boundary component at the given index in this component.

Note that the index of a boundary component within this component may not be the same as its index within the overall triangulation.

Parameters
indexspecifies which boundary component to return; this should be between 0 and countBoundaryComponents()-1 inclusive.
Returns
the requested boundary component.

◆ boundaryComponents()

const std::vector< BoundaryComponent< dim > * > & regina::detail::ComponentBase< dim >::boundaryComponents ( ) const
inherited

Returns all boundary components in this component.

The reference that is returned will remain valid only for as long as this component object exists. In particular, the reference will become invalid any time that the triangulation changes (since all component objects will be destroyed and others rebuilt in their place).

Python:
This routine returns a python list.
Returns
the list of all boundary components.

◆ countBoundaryComponents()

size_t regina::detail::ComponentBase< dim >::countBoundaryComponents ( ) const
inlineinherited

Returns the number of boundary components in this component.

Returns
the number of boundary components.

◆ countBoundaryFacets()

size_t regina::detail::ComponentBase< dim >::countBoundaryFacets ( ) const
inlineinherited

Returns the number of boundary facets in this component.

A boundary facet is a (dim-1)-dimensional facet of a top-dimensional simplex that is not joined to any adjacent simplex.

This routine runs in constant time (since the result is computed in advance, when the component is first created).

Returns
the total number of boundary facets.

◆ countFaces()

template<int subdim>
size_t regina::Component< 3 >::countFaces ( ) const

Returns the number of subdim-faces in this component.

Precondition
The template argument subdim is between 0 and 2 inclusive.
Python:
Python does not support templates. Instead, Python users should call this function in the form countFaces(subdim); that is, the template parameter subdim becomes the first argument of the function.
Returns
the number of subdim-faces.

◆ detail()

std::string regina::Output< ComponentBase< dim > , false >::detail ( ) const
inherited

Returns a detailed text representation of this object.

This text may span many lines, and should provide the user with all the information they could want. It should be human-readable, should not contain extremely long lines (which cause problems for users reading the output in a terminal), and should end with a final newline. There are no restrictions on the underlying character set.

Returns
a detailed text representation of this object.

◆ face()

template<int subdim>
Face<3, subdim>* regina::Component< 3 >::face ( size_t  index) const

Returns the requested subdim-face in this component.

Note that the index of a face in the component need not be the index of the same face in the overall triangulation.

Precondition
The template argument subdim is between 0 and 2 inclusive.
Python:
Python does not support templates. Instead, Python users should call this function in the form face(subdim, index); that is, the template parameter subdim becomes the first argument of the function.
Parameters
indexthe index of the desired face, ranging from 0 to countFaces<subdim>()-1 inclusive.
Returns
the requested face.

◆ faces()

template<int subdim>
const std::vector<Face<3, subdim>*>& regina::Component< 3 >::faces ( ) const

Returns a reference to the list of all subdim-faces in this component.

Precondition
The template argument subdim is between 0 and 2 inclusive.
Python:
Python users should call this function in the form faces(subdim). It will then return a Python list containing all the subdim-faces of the triangulation.
Returns
the list of all subdim-faces.

◆ hasBoundaryFacets()

bool regina::detail::ComponentBase< dim >::hasBoundaryFacets ( ) const
inlineinherited

Determines if this component has any boundary facets.

This routine returns true if and only if this component contains some top-dimensional simplex with at least one facet that is not glued to an adjacent simplex.

Returns
true if and only if this component has boundary facet(s).

◆ index()

size_t regina::detail::ComponentBase< dim >::index ( ) const
inlineinherited

Returns the index of this component within the underlying triangulation.

Returns
the index of this component.

◆ isClosed()

bool regina::Component< 3 >::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.

◆ isIdeal()

bool regina::Component< 3 >::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 Vertex<3>::isIdeal().

Returns
true if and only if this component is ideal.

◆ isOrientable()

bool regina::detail::ComponentBase< dim >::isOrientable ( ) const
inlineinherited

Determines if this component is orientable.

This routine runs in constant time (since orientability is determined in advance, when the component is first created).

Returns
true if and only if this component is orientable.

◆ isValid()

bool regina::detail::ComponentBase< dim >::isValid ( ) const
inlineinherited

Determines if this component is valid.

This uses the same criteria as Triangulation<dim>::isValid(); see the Triangulation<dim>::isValid() documentation for details.

As with Triangulation<dim>, this tests for bad self-identifications in all dimensions, but only tests for bad links in Regina's standard dimensions.

Returns
true if and only if this component is valid.

◆ markedIndex()

size_t regina::MarkedElement::markedIndex ( ) const
inlineinherited

Returns the index at which this object is stored in an MarkedVector.

If this object does not belong to an MarkedVector, the return value is undefined.

Returns
the index at which this object is stored.

◆ simplex()

Simplex< dim > * regina::detail::ComponentBase< dim >::simplex ( size_t  index) const
inlineinherited

Returns the top-dimensional simplex at the given index in this component.

Note that the index within this component may not be the same as the index within the overall triangulation.

Parameters
indexspecifies which simplex to return; this value should be between 0 and size()-1 inclusive.
Returns
the indexth top-dimensional simplex.

◆ simplices()

const std::vector< Simplex< dim > * > & regina::detail::ComponentBase< dim >::simplices ( ) const
inlineinherited

Returns all top-dimensional simplices in this component.

The reference that is returned will remain valid only for as long as this component object exists. In particular, the reference will become invalid any time that the triangulation changes (since all component objects will be destroyed and others rebuilt in their place).

Python:
This routine returns a python list.
Returns
the list of all top-dimensional simplices.

◆ size()

size_t regina::detail::ComponentBase< dim >::size ( ) const
inlineinherited

Returns the number of top-dimensional simplices in this component.

Returns
The number of top-dimensional simplices.

◆ str()

std::string regina::Output< ComponentBase< dim > , false >::str ( ) const
inherited

Returns a short text representation of this object.

This text should be human-readable, should fit on a single line, and should not end with a newline. Where possible, it should use plain ASCII characters.

Python:
In addition to str(), this is also used as the Python "stringification" function __str__().
Returns
a short text representation of this object.

◆ utf8()

std::string regina::Output< ComponentBase< dim > , false >::utf8 ( ) const
inherited

Returns a short text representation of this object using unicode characters.

Like str(), this text should be human-readable, should fit on a single line, and should not end with a newline. In addition, it may use unicode characters to make the output more pleasant to read. This string will be encoded in UTF-8.

Returns
a short text representation of this object.

◆ writeTextLong()

void regina::detail::ComponentBase< dim >::writeTextLong ( std::ostream &  out) const
inherited

Writes a detailed text representation of this object to the given output stream.

Python:
Not present.
Parameters
outthe output stream to which to write.

◆ writeTextShort()

void regina::detail::ComponentBase< dim >::writeTextShort ( std::ostream &  out) const
inherited

Writes a short text representation of this object to the given output stream.

Python:
Not present.
Parameters
outthe output stream to which to write.

Member Data Documentation

◆ valid_

bool regina::detail::ComponentBase< dim >::valid_
protectedinherited

Is this component valid? See Triangulation<dim>::isValid() for details on what this means.


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

Copyright © 1999-2016, 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@maths.uq.edu.au).