Regina Calculation Engine
Public Member Functions | Friends | List of all members
regina::NCusp Class Reference

Represents a single cusp of a SnapPea triangulation. More...

#include <snappea/nsnappeatriangulation.h>

Inheritance diagram for regina::NCusp:
regina::ShareableObject regina::boost::noncopyable

Public Member Functions

virtual ~NCusp ()
 Default destructor. More...
 
NVertexvertex () const
 Returns the corresponding vertex of the Regina triangulation (i.e., of the NTriangulation structure that is inherited by NSnapPeaTriangulation). 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...
 
void writeTextShort (std::ostream &out) const
 Writes this object in short text format to the given output stream. More...
 
Input and Output
virtual void writeTextLong (std::ostream &out) const
 Writes this object in long text format to the given output stream. More...
 
std::string str () const
 Returns the output from writeTextShort() as a string. More...
 
std::string toString () const
 A deprecated alias for str(), which returns the output from writeTextShort() as a string. More...
 
std::string detail () const
 Returns the output from writeTextLong() as a string. More...
 
std::string toStringLong () const
 A deprecated alias for detail(), which returns the output from writeTextLong() as a string. More...
 

Friends

class NSnapPeaTriangulation
 Allow access to private members. More...
 

Detailed Description

Represents a single cusp of a SnapPea triangulation.

See the NSnapPeaTriangulation class for further details.

NCusp objects should be considered temporary only. They are preserved if you change the fillings (via NSnapPeaTriangulation::fill() or NSnapPeaTriangulation::unfill()). However, if you change the SnapPea triangulation itself (e.g., via randomize()), then all cusp objects will be deleted and replaced with new ones (using fresh data re-fetched from the SnapPea kernel).

Constructor & Destructor Documentation

regina::NCusp::~NCusp ( )
inlinevirtual

Default destructor.

Member Function Documentation

bool regina::NCusp::complete ( ) const
inline

Returns whether this cusp is complete.

SnapPy:
In SnapPy, this field corresponds to querying Manifold.cusp_info('is_complete')[cusp_number].
Returns
true if this cusp is complete, or false if it is filled.
std::string regina::ShareableObject::detail ( ) const
inherited

Returns the output from writeTextLong() as a string.

Returns
a long text representation of this object.
int regina::NCusp::l ( ) const
inline

Returns the second (longitude) filling coefficient on this cusp, or 0 if this cusp is complete.

SnapPy:
In SnapPy, this field corresponds to querying Manifold.cusp_info('filling')[cusp_number][1].
Returns
the second filling coefficient.
int regina::NCusp::m ( ) const
inline

Returns the first (meridian) filling coefficient on this cusp, or 0 if this cusp is complete.

SnapPy:
In SnapPy, this field corresponds to querying Manifold.cusp_info('filling')[cusp_number][0].
Returns
the first filling coefficient.
std::string regina::ShareableObject::str ( ) const
inherited

Returns the output from writeTextShort() as a string.

Python:
This implements the __str__() function.
Returns
a short text representation of this object.
std::string regina::ShareableObject::toString ( ) const
inlineinherited

A deprecated alias for str(), which returns the output from writeTextShort() as a string.

Deprecated:
This routine has (at long last) been deprecated; use the simpler-to-type str() instead.
Returns
a short text representation of this object.
std::string regina::ShareableObject::toStringLong ( ) const
inlineinherited

A deprecated alias for detail(), which returns the output from writeTextLong() as a string.

Deprecated:
This routine has (at long last) been deprecated; use the simpler-to-type detail() instead.
Returns
a long text representation of this object.
NVertex * regina::NCusp::vertex ( ) const
inline

Returns the corresponding vertex of the Regina triangulation (i.e., of the NTriangulation structure that is inherited by NSnapPeaTriangulation).

Note that cusp and vertex indexing might not be in sync; that is, SnapPea's cusp(i) need not correspond to Regina's getVertex(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.

void regina::ShareableObject::writeTextLong ( std::ostream &  out) const
inlinevirtualinherited

Writes this object in long text format to the given output stream.

The output should provide the user with all the information they could want. The output should be human-readable, should not contain extremely long lines (so users can read the output in a terminal), and should end with a final newline.

The default implementation of this routine merely calls writeTextShort() and adds a newline.

Python:
The parameter out does not exist; standard output will be used.
Parameters
outthe output stream to which to write.

Reimplemented in regina::NSnapPeaTriangulation, regina::NGroupPresentation, regina::NHomMarkedAbelianGroup, regina::NNormalSurfaceList, regina::NTetrahedron, regina::NSatRegion, regina::NVertex, regina::NEdge, regina::Dim2Triangle, regina::NTriangle, regina::NLayeredSolidTorus, regina::NHomGroupPresentation, regina::NGenericIsomorphism< dim >, regina::NGenericIsomorphism< 2 >, regina::NGenericIsomorphism< 3 >, regina::NTriangulation, regina::NComponent, regina::NTxICore, regina::NTriSolidTorus, regina::NAngleStructureList, regina::Dim2Edge, regina::NBoundaryComponent, regina::NLayeredChain, regina::Dim2Vertex, regina::Dim2Component, regina::NScript, regina::NAugTriSolidTorus, regina::NSpiralSolidTorus, regina::NSurfaceFilterProperties, regina::NLayeredTorusBundle, regina::NManifold, regina::NPlugTriSolidTorus, regina::NMatrixInt, regina::NBlockedSFSTriple, regina::NPluggedTorusBundle, regina::Dim2Triangulation, regina::NSurfaceSubset, regina::NLayeredLensSpace, regina::NLayeredLoop, regina::NFileInfo, regina::NBlockedSFSLoop, regina::NSnappedBall, regina::NBlockedSFSPair, regina::Dim2BoundaryComponent, regina::NTrivialTri, regina::NL31Pillow, regina::NLayeredChainPair, regina::NText, regina::NSurfaceFilterCombination, and regina::NBlockedSFS.

void regina::NCusp::writeTextShort ( std::ostream &  out) const
virtual

Writes this object in short text format to the given output stream.

The output should be human-readable, should fit on a single line, and should not end with a newline.

Python:
The parameter out does not exist; standard output will be used.
Parameters
outthe output stream to which to write.

Implements regina::ShareableObject.

Friends And Related Function Documentation

friend class NSnapPeaTriangulation
friend

Allow access to private members.


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

Copyright © 1999-2014, 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@debian.org).