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

Helper class that provides core functionality for a top-dimensional simplex in a dim-manifold triangulation. More...

#include <triangulation/detail/simplex.h>

Inheritance diagram for regina::detail::SimplexBase< dim >:
regina::MarkedElement regina::Output< SimplexBase< dim > > regina::detail::SimplexFacesSuite< dim, dim-1 > regina::alias::FaceOfSimplex< SimplexBase< dim >, dim > regina::detail::SimplexFaces< dim, subdim > regina::Face< 2, 2 > regina::Face< 3, 3 > regina::Face< dim, dim >

Public Types

typedef IntOfMinSize<(dim/8)+1 >::utype FacetMask
 An unsigned integer type with at least dim+1 bits. More...
 

Public Member Functions

const std::string & description () const
 Returns the description associated with this simplex. More...
 
void setDescription (const std::string &desc)
 Sets the description associated with this simplex. More...
 
size_t index () const
 Returns the index of this simplex in the underlying triangulation. More...
 
Simplex< dim > * adjacentSimplex (int facet) const
 Returns the adjacent simplex that is glued to the given facet of this simplex. More...
 
Perm< dim+1 > adjacentGluing (int facet) const
 Returns a permutation that indicates precisely how this simplex is glued to the adjacent simplex across the given facet. More...
 
int adjacentFacet (int facet) const
 If the given facet of this simplex is glued to facet f of some adjacent simplex, then this routine returns the adjacent facet number f. More...
 
bool hasBoundary () const
 Determines if this simplex has any facets that lie on the triangulation boundary. More...
 
void join (int myFacet, Simplex< dim > *you, Perm< dim+1 > gluing)
 Joins the given facet of this simplex to some facet of another simplex. More...
 
Simplex< dim > * unjoin (int myFacet)
 Unglues the given facet of this simplex from whatever it is joined to. More...
 
void isolate ()
 Unglues this simplex from any adjacent simplices. More...
 
Triangulation< dim > * triangulation () const
 Returns the triangulation to which this simplex belongs. More...
 
Component< dim > * component () const
 Returns the connected component of the triangulation to which this simplex belongs. More...
 
template<int subdim>
Face< dim, subdim > * face (int face) const
 Returns the subdim-face of the underlying triangulation that appears as the given subdim-face of this simplex. More...
 
Face< dim, 1 > * edge (int i, int j) const
 Returns the edge of this simplex that connects the two given vertices of this simplex. More...
 
template<int subdim>
Perm< dim+1 > faceMapping (int face) const
 Examines the given subdim-face of this simplex, and returns the mapping between the underlying subdim-face of the triangulation and the individual vertices of this simplex. More...
 
int orientation () const
 Returns the orientation of this simplex in the dim-dimensional triangulation. More...
 
bool facetInMaximalForest (int facet) const
 Determines whether the given facet of this simplex belongs to the maximal forest that has been chosen for the dual 1-skeleton of the underlying triangulation. 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...
 
 SimplexBase (const SimplexBase &)=delete
 
SimplexBaseoperator= (const SimplexBase &)=delete
 
Edge< 2 > * edge (int i, int j) const
 
Edge< 3 > * edge (int i, int j) const
 
Edge< 4 > * edge (int i, int j) const
 
size_t markedIndex () const
 Returns the index at which this object is stored in an MarkedVector. 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...
 

Protected Member Functions

 SimplexBase (Triangulation< dim > *tri)
 Creates a new simplex with no description and no facets joined to anything. More...
 
 SimplexBase (const std::string &desc, Triangulation< dim > *tri)
 Creates a new simplex with the given description and no facets joined to anything. More...
 
bool sameDegrees (const SimplexFacesSuite< dim, subdim > &other, Perm< dim+1 > p) const
 Tests whether the k-face degrees of this and the given simplex are identical, under the given relabelling, for all faces of all dimensions ksubdim. More...
 
bool sameDegrees (const SimplexFaces< dim, subdim > &other, Perm< dim+1 > p) const
 Tests whether the subdim-face degrees of this and the given simplex are identical, under the given relabelling. More...
 
void clear ()
 Resets all face pointers to null. More...
 

Protected Attributes

Face< dim, subdim > * face_ [FaceNumbering< dim, subdim >::nFaces]
 The faces of the underlying triangulation that form the individual subdim-faces of this simplex. More...
 
Perm< dim+1 > mapping_ [FaceNumbering< dim, subdim >::nFaces]
 For each subdim-face of this simplex, maps vertices (0,1,...,subdim) of the underlying subdim-face of the triangulation to the corresponding vertices of this simplex, as described by faceMapping(). More...
 

Friends

class TriangulationBase< dim >
 
class Triangulation< dim >
 

Detailed Description

template<int dim>
class regina::detail::SimplexBase< dim >

Helper class that provides core functionality for a top-dimensional simplex in a dim-manifold triangulation.

Each top-dimensional simplex is represented by the class Simplex<dim>, which uses this as a base class. End users should not need to refer to SimplexBase directly.

See the Simplex template class notes for further information, including details of how the vertices and facets of each simplex are numbered.

Python:\n This base class is not present, but the "end user" class
Simplex<dim> is.
Template Parameters
dimthe dimension of the underlying triangulation. This must be between 2 and 15 inclusive.

Member Function Documentation

◆ detail()

std::string regina::Output< SimplexBase< 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.

◆ sameDegrees()

bool regina::detail::SimplexFacesSuite< dim >::sameDegrees ( const SimplexFacesSuite< dim, subdim > &  other,
Perm< dim+1 >  p 
) const
inlineprotectedinherited

Tests whether the k-face degrees of this and the given simplex are identical, under the given relabelling, for all faces of all dimensions ksubdim.

Parameters
otherthe simplex to compare against this.
pa mapping from the vertices of this simplex to the vertices of other.
Returns
true if and only if, for every i and every facial dimension ksubdim, k-face number i of this simplex has the same degree as its image in other under the relabelling p.

◆ str()

std::string regina::Output< SimplexBase< 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< SimplexBase< 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 file:

Copyright © 1999-2018, 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).