Regina Calculation Engine
|
Represents a subset of a normal surface set. More...
#include <surfaces/nsurfacesubset.h>
Public Member Functions | |
NSurfaceSubset (const NSurfaceSet &set, const NSurfaceFilter &filter) | |
Creates a new normal surface subset. | |
virtual | ~NSurfaceSubset () |
Destroys this normal surface subset. | |
virtual int | getFlavour () const |
Returns the flavour of coordinate system being used by the surfaces stored in this set. | |
virtual bool | allowsAlmostNormal () const |
Determines if the flavour of coordinate system being used allows for almost normal surfaces, that is, allows for octagonal discs. | |
virtual bool | allowsSpun () const |
Determines if the flavour of coordinate system being used allows for spun normal surfaces. | |
virtual bool | isEmbeddedOnly () const |
Returns whether this set is known to contain only embedded normal surfaces. | |
virtual NTriangulation * | getTriangulation () const |
Returns the triangulation in which these normal surfaces live. | |
virtual unsigned long | getNumberOfSurfaces () const |
Returns the number of surfaces stored in this set. | |
virtual const NNormalSurface * | getSurface (unsigned long index) const |
Returns the surface at the requested index in this set. | |
virtual ShareableObject * | getShareableObject () |
Returns this object cast as a ShareableObject. | |
virtual void | writeTextShort (std::ostream &out) const |
Writes this object in short text format to the given output stream. | |
virtual void | writeTextLong (std::ostream &out) const |
Writes this object in long text format to the given output stream. |
Represents a subset of a normal surface set.
This subset merely contains pointers to some of the normal surfaces stored in the original set.
If the surfaces in the original set should change, the surfaces in this subset will thus change also. If the original set is deleted, this subset will become invalid.
regina::NSurfaceSubset::NSurfaceSubset | ( | const NSurfaceSet & | set, |
const NSurfaceFilter & | filter | ||
) |
Creates a new normal surface subset.
The surfaces included in the subset will be those from the given set that are accepted by the given filter.
set | the surface set for which this will be a subset. |
filter | the filter that defines which surfaces in set will be included in this subset. |
regina::NSurfaceSubset::~NSurfaceSubset | ( | ) | [inline, virtual] |
Destroys this normal surface subset.
bool regina::NSurfaceSubset::allowsAlmostNormal | ( | ) | const [inline, virtual] |
Determines if the flavour of coordinate system being used allows for almost normal surfaces, that is, allows for octagonal discs.
true
if and only if almost normal surfaces are allowed. Implements regina::NSurfaceSet.
bool regina::NSurfaceSubset::allowsSpun | ( | ) | const [inline, virtual] |
Determines if the flavour of coordinate system being used allows for spun normal surfaces.
true
if and only if spun normal surface are supported. Implements regina::NSurfaceSet.
int regina::NSurfaceSubset::getFlavour | ( | ) | const [inline, virtual] |
Returns the flavour of coordinate system being used by the surfaces stored in this set.
This will be one of the predefined coordinate system constants in NNormalSurfaceList.
Implements regina::NSurfaceSet.
unsigned long regina::NSurfaceSubset::getNumberOfSurfaces | ( | ) | const [inline, virtual] |
Returns the number of surfaces stored in this set.
Implements regina::NSurfaceSet.
ShareableObject * regina::NSurfaceSubset::getShareableObject | ( | ) | [inline, virtual] |
Returns this object cast as a ShareableObject.
Generally the implementation of this routine will simply be return this;
.
This routine is necessary because NSurfaceSet is not of type ShareableObject; however, it is presumed that each of its derived classes will be. The aim here is to reduce the mess that could arise combining virtual multiple inheritance with the voluminous casting and recasting that takes place when working with external interfaces.
Implements regina::NSurfaceSet.
const NNormalSurface * regina::NSurfaceSubset::getSurface | ( | unsigned long | index | ) | const [inline, virtual] |
Returns the surface at the requested index in this set.
index | the index of the requested surface in this set; this must be between 0 and getNumberOfSurfaces()-1 inclusive. |
Implements regina::NSurfaceSet.
NTriangulation * regina::NSurfaceSubset::getTriangulation | ( | ) | const [inline, virtual] |
Returns the triangulation in which these normal surfaces live.
Implements regina::NSurfaceSet.
bool regina::NSurfaceSubset::isEmbeddedOnly | ( | ) | const [inline, virtual] |
Returns whether this set is known to contain only embedded normal surfaces.
If it is possible that there are non-embedded surfaces in this set but it is not known whether any are actually present or not, this routine should return false
.
true
if it is known that only embedded normal surfaces exist in this list, or false
if immersed and/or singular normal surfaces might be present. Implements regina::NSurfaceSet.
void regina::NSurfaceSubset::writeTextLong | ( | std::ostream & | out | ) | const [inline, virtual] |
Writes this object in long text format to the given output stream.
The output should provided the user with all the information they could want. The output should end with a newline.
The default implementation of this routine merely calls writeTextShort() and adds a newline.
out | the output stream to which to write. |
Reimplemented from regina::ShareableObject.
void regina::NSurfaceSubset::writeTextShort | ( | std::ostream & | out | ) | const [inline, virtual] |
Writes this object in short text format to the given output stream.
The output should fit on a single line and no newline should be written.
out | the output stream to which to write. |
Implements regina::ShareableObject.