Regina Calculation Engine
|
Helper class that provides core functionality for a connected component of a dim-manifold triangulation. More...
#include <triangulation/detail/component.h>
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 Member Functions | |
ComponentBase () | |
Default constructor. More... | |
Protected Attributes | |
bool | valid_ |
Is this component valid? See Triangulation<dim>::isValid() for details on what this means. More... | |
Friends | |
class | Triangulation< dim > |
class | TriangulationBase< dim > |
Helper class that provides core functionality for a connected component of a dim-manifold triangulation.
Each connected component is represented by the class Component<dim>, which uses this as a base class. End users should not need to refer to ComponentBase directly.
See the Component class notes for further information.
dim | the dimension of the underlying triangulation. This must be between 2 and 15 inclusive. |
|
inlineprotected |
Default constructor.
Marks the component as orientable, with no boundary facets.
|
inline |
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.
index | specifies which boundary component to return; this should be between 0 and countBoundaryComponents()-1 inclusive. |
const std::vector< BoundaryComponent< dim > * > & regina::detail::ComponentBase< dim >::boundaryComponents | ( | ) | const |
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).
|
inline |
Returns the number of boundary components in this component.
|
inline |
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).
|
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.
|
inline |
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.
true
if and only if this component has boundary facet(s).
|
inline |
Returns the index of this component within the underlying triangulation.
|
inline |
Determines if this component is orientable.
This routine runs in constant time (since orientability is determined in advance, when the component is first created).
true
if and only if this component is orientable.
|
inline |
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.
true
if and only if this component is valid.
|
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.
|
inline |
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.
index | specifies which simplex to return; this value should be between 0 and size()-1 inclusive. |
|
inline |
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).
|
inline |
Returns the number of top-dimensional simplices in this component.
|
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.
__str__()
.
|
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.
void regina::detail::ComponentBase< dim >::writeTextLong | ( | std::ostream & | out | ) | const |
Writes a detailed text representation of this object to the given output stream.
out | the output stream to which to write. |
void regina::detail::ComponentBase< dim >::writeTextShort | ( | std::ostream & | out | ) | const |
Writes a short text representation of this object to the given output stream.
out | the output stream to which to write. |
|
protected |
Is this component valid? See Triangulation<dim>::isValid() for details on what this means.