Represents a 2-sphere made from two snapped 3-balls in a triangulation.
This occurs when two snapped 3-balls are glued together at their equators (note that this gluing does not have to extend to triangular faces). Each 3-ball has a central disc (bounded by the 3-ball's equator and bisecting its internal degree one edge), and these two discs together form an embedded 2-sphere in the triangulation.
This 2-sphere can be cut along and the two resulting 2-sphere boundaries filled in with 3-balls, and the resulting triangulation has the same number of tetrahedra as the original. If the snapped 2-sphere was separating, the resulting triangulation will contain the two terms of the corresponding connected sum.
These objects are small enough to pass by value and swap with std::swap(), with no need for any specialised move operations or swap functions. However, the only way to create them (aside from copying or moving) is via the static member function recognise().
template<class T , bool supportsUtf8 = false>
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.
bool regina::SnappedTwoSphere::operator!= |
( |
const SnappedTwoSphere & |
other | ) |
const |
|
inline |
Determines whether this and the given object represent different specific presentations of a snapped 2-sphere.
Specifically, two snapped 2-spheres will compare as equal if and only if they slice through the same pair of numbered tetrahedra, presented in the same order, and bisecting the same numbered edges within corresponding tetrahedra.
Since this test looks at tetrahedron numbers and not the specific Tetrahedron objects, it is meaningful to compare snapped 2-spheres within different triangulations.
- Parameters
-
other | the snapped 2-sphere to compare with this. |
- Returns
true
if and only if this and the given object represent different specific presentations of a snapped 2-sphere.
bool regina::SnappedTwoSphere::operator== |
( |
const SnappedTwoSphere & |
other | ) |
const |
|
inline |
Determines whether this and the given object represent the same specific presentation of a snapped 2-sphere.
Specifically, two snapped 2-spheres will compare as equal if and only if they slice through the same pair of numbered tetrahedra, presented in the same order, and bisecting the same numbered degree one edges within corresponding tetrahedra.
Since this test looks at tetrahedron numbers and not the specific Tetrahedron objects, it is meaningful to compare snapped 2-spheres within different triangulations.
- Parameters
-
other | the snapped 2-sphere to compare with this. |
- Returns
true
if and only if this and the given object represent the same specific presentation of a snapped 2-sphere.
Determines if the two given snapped 3-balls together form a snapped 2-sphere.
If this is the case, the snapped 3-balls stored in the structure returned will be clones of the original 3-balls, not the original 3-balls themselves.
Even though SnappedTwoSphere is a two-dimensional class and so does not inherit from StandardTriangulation, this routine nevertheless returns by (smart) pointer for consistency with the StandardTriangulation recognition routines (which use pointers because of the polymorphic StandardTriangulation class hierarchy).
- Precondition
- The two given snapped 3-balls use distinct tetrahedra.
- Parameters
-
ball1 | the first snapped 3-ball to examine. |
ball2 | the second snapped 3-ball to examine. |
- Returns
- a structure containing details of the snapped 2-sphere, or
null
if the given snapped 3-balls do not form a snapped 2-sphere.
template<class T , bool supportsUtf8 = false>
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.
template<class T , bool supportsUtf8 = false>
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.