Regina 7.0 Calculation Engine
|
Used to return information about a single cusp of a SnapPea triangulation. More...
#include <snappea/snappeatriangulation.h>
Public Member Functions | |
Cusp (const Cusp &)=default | |
Creates a new copy of the given cusp information. More... | |
Cusp & | operator= (const Cusp &)=default |
Sets this to be a copy of the given cusp information. More... | |
Vertex< 3 > * | vertex () const |
Returns the corresponding vertex of the Regina triangulation (i.e., of the Triangulation<3> structure that is inherited by SnapPeaTriangulation). More... | |
bool | complete () const |
Returns whether this cusp is complete. More... | |
int | m () const |
Returns the first (meridian) filling coefficient on this cusp, or 0 if this cusp is complete. More... | |
int | l () const |
Returns the second (longitude) filling coefficient on this cusp, or 0 if this cusp is complete. More... | |
bool | operator== (const Cusp &other) const |
Determines whether this and the given object hold the same cusp information. More... | |
bool | operator!= (const Cusp &other) const |
Determines if this and the given object do not hold the same cusp information. 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... | |
Friends | |
class | SnapPeaTriangulation |
Allow access to private members. More... | |
Used to return information about a single cusp of a SnapPea triangulation.
See SnapPeaTriangulation::cusp() and SnapPeaTriangulation::cusps() for further details.
Cusp objects essentially package together information about a cusp as a standalone read-only object. Unlike Triangulation<3>::Vertex and other skeletal objects, a Cusp object does not uniquely define a cusp (if you need a unique identifier, use Cusp::vertex() for this). You can make many copies of the same Cusp object, and each copy will contain the same information and point to the same vertex of the underlying triangulation.
Cusp objects should be considered temporary only; you should not hold onto references or pointers to them. If you need to hold on to information about a cusp, you can simply copy the Cusp object by value (an operation that is both cheap and safe).
Cusp objects are small enough to pass by value and swap with std::swap(), with no need for any specialised move operations or swap functions.
|
default |
Creates a new copy of the given cusp information.
|
inline |
Returns whether this cusp is complete.
Manifold.cusp_info('is_complete')[cusp_number]
.true
if this cusp is complete, or false
if it is filled.
|
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 |
Returns the second (longitude) filling coefficient on this cusp, or 0 if this cusp is complete.
Manifold.cusp_info('filling')[cusp_number][1]
.
|
inline |
Returns the first (meridian) filling coefficient on this cusp, or 0 if this cusp is complete.
Manifold.cusp_info('filling')[cusp_number][0]
.
|
inline |
Determines if this and the given object do not hold the same cusp information.
Two Cusp objects are considered equal if they refer to the same vertex number of the underlying triangulation, and they have the same filling coefficients. Note that the vertex pointers do not need to be the same (i.e., it is meaningful to compare cusps from different triangulations).
other | the cusp information to compare with this. |
true
if and only this and the given object do not hold the same cusp information. Sets this to be a copy of the given cusp information.
|
inline |
Determines whether this and the given object hold the same cusp information.
Two Cusp objects are considered equal if they refer to the same vertex number of the underlying triangulation, and they have the same filling coefficients. Note that the vertex pointers do not need to be the same (i.e., it is meaningful to compare cusps from different triangulations).
other | the cusp information to compare with this. |
true
if and only this and the given object hold the same cusp information.
|
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.
str()
will use precisely this function, and for most classes the Python repr()
function will incorporate this into its output.
|
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.
|
inline |
Returns the corresponding vertex of the Regina triangulation (i.e., of the Triangulation<3> structure that is inherited by SnapPeaTriangulation).
Note that cusp and vertex indexing might not be in sync; that is, SnapPea's cusp(i)
need not correspond to Regina's vertex(i)
.
This routine can be used to detect if/when cusp numbering and vertex numbering fall out of sync, and to translate between them if/when this happens.
|
inlineinherited |
A default implementation for detailed output.
This routine simply calls T::writeTextShort() and appends a final newline.
out | the output stream to which to write. |
void regina::Cusp::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. |
|
friend |
Allow access to private members.