Regina 7.0 Calculation Engine
Public Member Functions | List of all members
regina::detail::FaceEmbeddingBase< dim, subdim > Class Template Reference

Helper class that provides core functionality for describing how a subdim-face of a dim-dimensional triangulation appears within each top-dimensional simplex. More...

#include <triangulation/detail/face.h>

Inheritance diagram for regina::detail::FaceEmbeddingBase< dim, subdim >:
regina::ShortOutput< FaceEmbeddingBase< dim, subdim > > regina::alias::SimplexVoid< FaceEmbeddingBase< dim, subdim >, dim > regina::alias::FaceNumber< FaceEmbeddingBase< dim, subdim >, subdim > regina::Output< T, supportsUtf8 > regina::FaceEmbedding< dim, subdim >

Public Member Functions

 FaceEmbeddingBase ()
 Default constructor. More...
 
 FaceEmbeddingBase (Simplex< dim > *simplex, Perm< dim+1 > vertices)
 Creates a new object containing the given data. More...
 
 FaceEmbeddingBase (const FaceEmbeddingBase &cloneMe)=default
 Creates a new copy of the given object. More...
 
FaceEmbeddingBaseoperator= (const FaceEmbeddingBase &cloneMe)=default
 Makes this a copy of the given object. More...
 
Simplex< dim > * simplex () const
 Returns the top-dimensional simplex in which the underlying subdim-face of the triangulation is contained. More...
 
int face () const
 Returns the corresponding face number of simplex(). More...
 
Perm< dim+1 > vertices () const
 Maps vertices (0,...,subdim) of the underlying subdim-face of the triangulation to the corresponding vertex numbers of simplex(). More...
 
bool operator== (const FaceEmbeddingBase &rhs) const
 Tests whether this and the given object are identical. More...
 
bool operator!= (const FaceEmbeddingBase &rhs) const
 Tests whether this and the given object are not identical. 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
 A default implementation for detailed output. 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...
 

Detailed Description

template<int dim, int subdim>
class regina::detail::FaceEmbeddingBase< dim, subdim >

Helper class that provides core functionality for describing how a subdim-face of a dim-dimensional triangulation appears within each top-dimensional simplex.

Each such appearance is described by a FaceEmbedding<dim, subdim> object, which uses this as a base class. End users should not need to refer to FaceEmbeddingBase directly.

See the FaceEmbedding template class notes for further information.

Python
This base class is not present, but the "end user" class FaceEmbedding<dim, subdim> is.
Template Parameters
dimthe dimension of the underlying triangulation. This must be between 2 and 15 inclusive.
subdimthe dimension of the faces of the underlying triangulation. This must be between 0 and dim-1 inclusive.

Constructor & Destructor Documentation

◆ FaceEmbeddingBase() [1/3]

template<int dim, int subdim>
regina::detail::FaceEmbeddingBase< dim, subdim >::FaceEmbeddingBase
inline

Default constructor.

This object is unusable until it has some data assigned to it using operator =.

Python
Not present, since the C++ assignment operators are not accessible to Python.

◆ FaceEmbeddingBase() [2/3]

template<int dim, int subdim>
regina::detail::FaceEmbeddingBase< dim, subdim >::FaceEmbeddingBase ( Simplex< dim > *  simplex,
Perm< dim+1 >  vertices 
)
inline

Creates a new object containing the given data.

Parameters
simplexthe top-dimensional simplex in which the underlying subdim-face of the triangulation is contained.
verticesa mapping from the vertices of the underlying subdim-face of the triangulation to the corresponding vertex numbers of simplex. See vertices() for details of how this permutation should be structured.

◆ FaceEmbeddingBase() [3/3]

template<int dim, int subdim>
regina::detail::FaceEmbeddingBase< dim, subdim >::FaceEmbeddingBase ( const FaceEmbeddingBase< dim, subdim > &  cloneMe)
default

Creates a new copy of the given object.

Parameters
cloneMethe object to copy.

Member Function Documentation

◆ detail()

template<class T , bool supportsUtf8 = false>
std::string regina::Output< T, supportsUtf8 >::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 dim, int subdim>
int regina::detail::FaceEmbeddingBase< dim, subdim >::face
inline

Returns the corresponding face number of simplex().

This identifies which face of the top-dimensional simplex simplex() refers to the underlying subdim-face of the triangulation.

If the face dimension subdim is at most 4, then you can also access this face number through a dimension-specific alias (e.g., edge() in the case subdim = 1).

Returns
the corresponding face number of the top-dimensional simplex. This will be between 0 and (dim+1 choose subdim+1)-1 inclusive.

◆ operator!=()

template<int dim, int subdim>
bool regina::detail::FaceEmbeddingBase< dim, subdim >::operator!= ( const FaceEmbeddingBase< dim, subdim > &  rhs) const
inline

Tests whether this and the given object are not identical.

Here identical means that two FaceEmbedding objects refer to the same-numbered face of the same-numbered simplex, and have the same embedding permutations as returned by vertices().

In particular, since this test only examines face/simplex/vertex numbers (not object pointers), it is meaningful to compare two FaceEmbedding objects from different underlying triangulations.

Warning
The meaning of this comparison changed in Regina 7.0. In older versions of Regina, to compare as equal, two FaceEmbedding objects (i) had to be faces of the same Simplex object (a stronger requirement that effectively restricted this test to faces of the same triangulation); but also (ii) only had to refer to the same-numbered face, not use the same full embedding permutations (a weaker requirement that nowadays would incur an unacceptable performance cost).
Parameters
rhsthe object to compare with this.
Returns
true if and only if both object are identical.

◆ operator=()

template<int dim, int subdim>
FaceEmbeddingBase & regina::detail::FaceEmbeddingBase< dim, subdim >::operator= ( const FaceEmbeddingBase< dim, subdim > &  cloneMe)
default

Makes this a copy of the given object.

Parameters
cloneMethe object to copy.

◆ operator==()

template<int dim, int subdim>
bool regina::detail::FaceEmbeddingBase< dim, subdim >::operator== ( const FaceEmbeddingBase< dim, subdim > &  rhs) const
inline

Tests whether this and the given object are identical.

Here identical means that two FaceEmbedding objects refer to the same-numbered face of the same-numbered simplex, and have the same embedding permutations as returned by vertices().

In particular, since this test only examines face/simplex/vertex numbers (not object pointers), it is meaningful to compare two FaceEmbedding objects from different underlying triangulations.

Warning
The meaning of this comparison changed in Regina 7.0. In older versions of Regina, to compare as equal, two FaceEmbedding objects (i) had to be faces of the same Simplex object (a stronger requirement that effectively restricted this test to faces of the same triangulation); but also (ii) only had to refer to the same-numbered face, not use the same full embedding permutations (a weaker requirement that nowadays would incur an unacceptable performance cost).
Parameters
rhsthe object to compare with this.
Returns
true if and only if both object are identical.

◆ simplex()

template<int dim, int subdim>
Simplex< dim > * regina::detail::FaceEmbeddingBase< dim, subdim >::simplex
inline

Returns the top-dimensional simplex in which the underlying subdim-face of the triangulation is contained.

If the triangulation dimension dim is at most 4, then you can also access this simplex through a dimension-specific alias (e.g., tetrahedron() in the case dim = 3).

Returns
the top-dimensional simplex.

◆ str()

template<class T , bool supportsUtf8 = false>
std::string regina::Output< T, supportsUtf8 >::str ( ) const
inherited

Returns a short text representation of this object.

This text should be human-readable, should use plain ASCII characters where possible, and should not contain any newlines.

Within these limits, this short text ouptut should be as information-rich as possible, since in most cases this forms the basis for the Python str() and repr() functions.

Python
The Python "stringification" function str() will use precisely this function, and for most classes the Python repr() function will incorporate this into its output.
Returns
a short text representation of this object.

◆ utf8()

template<class T , bool supportsUtf8 = false>
std::string regina::Output< T, supportsUtf8 >::utf8 ( ) const
inherited

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

Like str(), this text should be human-readable, should not contain any newlines, and (within these constraints) should be as information-rich as is reasonable.

Unlike str(), this function may use unicode characters to make the output more pleasant to read. The string that is returned will be encoded in UTF-8.

Returns
a short text representation of this object.

◆ vertices()

template<int dim, int subdim>
Perm< dim+1 > regina::detail::FaceEmbeddingBase< dim, subdim >::vertices
inline

Maps vertices (0,...,subdim) of the underlying subdim-face of the triangulation to the corresponding vertex numbers of simplex().

If the link of the underlying subdim-face is orientable, then this permutation also maps (subdim+1, ..., dim) to the remaining vertex numbers of simplex() in a manner that preserves orientation as you walk through the many different FaceEmbedding objects for the same underlying subdim-face.

This routine returns the same permutation as simplex().faceMapping<subdim>(face()) (and this routine is faster if you already have a FaceEmbedding). See Simplex<dim>::faceMapping() for details.

Returns
a mapping from the vertices of the underlying subdim-face to the corresponding vertices of simplex().

◆ writeTextLong()

void regina::ShortOutput< FaceEmbeddingBase< dim, subdim > , false >::writeTextLong ( std::ostream &  out) const
inlineinherited

A default implementation for detailed output.

This routine simply calls T::writeTextShort() and appends a final newline.

Python
Not present; instead you can call detail() from the subclass T, which returns this output as a string.
Parameters
outthe output stream to which to write.

◆ writeTextShort()

template<int dim, int subdim>
void regina::detail::FaceEmbeddingBase< dim, subdim >::writeTextShort ( std::ostream &  out) const
inline

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

Python
Not present; use str() instead.
Parameters
outthe output stream to which to write.

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

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