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

A connected component of a dim-manifold triangulation. More...

#include <triangulation/generic.h>

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

Public Member Functions

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 detail::TriangulationBase< dim >
 

Detailed Description

template<int dim>
class regina::Component< dim >

A connected component of a dim-manifold triangulation.

Components are highly temporary: whenever a triangulation changes, all of its component objects will be deleted and new ones will be created in their place.

Component objects are all created, managed and destroyed by the class Triangulation<dim>. See the Triangulation notes for further information on working with dim-dimensional triangulations.

For Regina's standard dimensions, this template is specialised and offers more functionality. In order to use these specialised classes, you will need to include the corresponding triangulation headers (e.g., triangulation/dim2.h for dim = 2, or triangulation/dim3.h for dim = 3).

Python:\n Python does not support templates. Instead
this class can be used by appending the dimension as a suffix (e.g., Component2 and Component3 for dimensions 2 and 3).
Template Parameters
dimthe dimension of the underlying triangulation. This must be between 2 and 15 inclusive.

Member Function Documentation

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

◆ 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:\n 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.

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

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