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