Regina Calculation Engine
|
Stores the vector of a single normal surface in a 3-manifold. More...
#include <surfaces/nnormalsurface.h>
Public Member Functions | |
NNormalSurfaceVector (size_t length) | |
Creates a new vector all of whose entries are initialised to zero. More... | |
NNormalSurfaceVector (const NVector< NLargeInteger > &cloneMe) | |
Creates a new vector that is a clone of the given vector. More... | |
virtual | ~NNormalSurfaceVector () |
A virtual destructor. More... | |
virtual NNormalSurfaceVector * | clone () const =0 |
Creates a newly allocated clone of this vector. More... | |
virtual bool | allowsAlmostNormal () const =0 |
Determines if the specific underlying coordinate system allows for almost normal surfaces, that is, allows for octagonal discs. More... | |
virtual bool | allowsSpun () const =0 |
Determines if the specific underlying coordinate system allows for spun-normal surfaces; that is, surfaces with infinitely many triangles. More... | |
virtual bool | allowsOriented () const =0 |
Determines if the specific underlying coordinate system allows for transversely oriented normal surfaces. More... | |
virtual bool | hasMultipleOctDiscs (NTriangulation *triang) const |
Determines if this normal surface has more than one octagonal disc. More... | |
virtual bool | isCompact (NTriangulation *triang) const |
Determines if the normal surface represented is compact (has finitely many discs). More... | |
virtual bool | isVertexLinking (NTriangulation *triang) const |
Determines if the normal surface represented is vertex linking. More... | |
virtual const NVertex * | isVertexLink (NTriangulation *triang) const |
Determines if a rational multiple of the normal surface represented is the link of a single vertex. More... | |
virtual std::pair< const NEdge *, const NEdge * > | isThinEdgeLink (NTriangulation *triang) const |
Determines if a rational multiple of the normal surface represented is the thin link of a single edge. More... | |
virtual bool | isSplitting (NTriangulation *triang) const |
Determines if the normal surface represented is a splitting surface in the given triangulation. More... | |
virtual NLargeInteger | isCentral (NTriangulation *triang) const |
Determines if the normal surface represented is a central surface in the given triangulation. More... | |
virtual NLargeInteger | getTriangleCoord (unsigned long tetIndex, int vertex, NTriangulation *triang) const =0 |
Returns the number of triangular discs of the given type in this normal surface. More... | |
virtual NLargeInteger | getOrientedTriangleCoord (unsigned long tetIndex, int vertex, NTriangulation *triang, bool orientation) const |
Returns the number of oriented triangular discs of the given type in this normal surface. More... | |
virtual NLargeInteger | getQuadCoord (unsigned long tetIndex, int quadType, NTriangulation *triang) const =0 |
Returns the number of quadrilateral discs of the given type in this normal surface. More... | |
virtual NLargeInteger | getOrientedQuadCoord (unsigned long tetIndex, int quadType, NTriangulation *triang, bool orientation) const |
Returns the number of oriented quadrilateral discs of the given type in this normal surface. More... | |
virtual NLargeInteger | getOctCoord (unsigned long tetIndex, int octType, NTriangulation *triang) const =0 |
Returns the number of octagonal discs of the given type in this normal surface. More... | |
virtual NLargeInteger | getEdgeWeight (unsigned long edgeIndex, NTriangulation *triang) const =0 |
Returns the number of times this normal surface crosses the given edge. More... | |
virtual NLargeInteger | getTriangleArcs (unsigned long triIndex, int triVertex, NTriangulation *triang) const =0 |
Returns the number of arcs in which this normal surface intersects the given triangle in the given direction. More... | |
NLargeInteger | getFaceArcs (unsigned long triIndex, int triVertex, NTriangulation *triang) const |
A deprecated alias for getTriangleArcs(). More... | |
![]() | |
NRay (size_t length) | |
Creates a new ray all of whose coordinates are initialised to zero. More... | |
NRay (const NVector< NLargeInteger > &cloneMe) | |
Creates a new ray that is a clone of the given ray. More... | |
void | scaleDown () |
Scales this vector down by the greatest common divisor of all its elements. More... | |
void | negate () |
Negates every element of this vector. More... | |
![]() | |
NVector (size_t newVectorSize) | |
Creates a new vector. More... | |
NVector (size_t newVectorSize, const NLargeInteger &initValue) | |
Creates a new vector and initialises every element to the given value. More... | |
NVector (const NVector< NLargeInteger > &cloneMe) | |
Creates a new vector that is a clone of the given vector. More... | |
~NVector () | |
Destroys this vector. More... | |
size_t | size () const |
Returns the number of elements in the vector. More... | |
const NLargeInteger & | operator[] (size_t index) const |
Returns the element at the given index in the vector. More... | |
void | setElement (size_t index, const NLargeInteger &value) |
Sets the element at the given index in the vector to the given value. More... | |
bool | operator== (const NVector< NLargeInteger > &compare) const |
Determines if this vector is equal to the given vector. More... | |
NVector< NLargeInteger > & | operator= (const NVector< NLargeInteger > &cloneMe) |
Sets this vector equal to the given vector. More... | |
void | operator+= (const NVector< NLargeInteger > &other) |
Adds the given vector to this vector. More... | |
void | operator-= (const NVector< NLargeInteger > &other) |
Subtracts the given vector from this vector. More... | |
void | operator*= (const NLargeInteger &factor) |
Multiplies this vector by the given scalar. More... | |
NLargeInteger | operator* (const NVector< NLargeInteger > &other) const |
Calculates the dot product of this vector and the given vector. More... | |
void | negate () |
Negates every element of this vector. More... | |
NLargeInteger | norm () const |
Returns the norm of this vector. More... | |
NLargeInteger | elementSum () const |
Returns the sum of all elements of this vector. More... | |
void | addCopies (const NVector< NLargeInteger > &other, const NLargeInteger &multiple) |
Adds the given multiple of the given vector to this vector. More... | |
void | subtractCopies (const NVector< NLargeInteger > &other, const NLargeInteger &multiple) |
Subtracts the given multiple of the given vector to this vector. More... | |
Static Public Member Functions | |
static NNormalSurfaceVector * | makeZeroVector (const NTriangulation *triangulation) |
Returns a new normal surface vector of the appropriate length for the given triangulation and for the coordinate system corresponding to this subclass of NNormalSurfaceVector. More... | |
static NMatrixInt * | makeMatchingEquations (NTriangulation *triangulation) |
Creates a new set of normal surface matching equations for the given triangulation using the coordinate system corresponding to this particular subclass of NNormalSurfaceVector. More... | |
static NEnumConstraintList * | makeEmbeddedConstraints (NTriangulation *triangulation) |
Creates a new set of validity constraints representing the condition that normal surfaces be embedded. More... | |
Additional Inherited Members | |
![]() | |
static NLargeInteger | zero |
Zero in the underlying number system. More... | |
static NLargeInteger | one |
One in the underlying number system. More... | |
static NLargeInteger | minusOne |
Negative one in the underlying number system. More... | |
![]() | |
NLargeInteger * | elements |
The internal array containing all vector elements. More... | |
NLargeInteger * | end |
A pointer just beyond the end of the internal array. More... | |
Stores the vector of a single normal surface in a 3-manifold.
The different subclasses of NNormalSurfaceVector use different underlying coordinate systems for the normal solution space. However, the various coordinate retrieval routines will return values that are independent of the underlying coordinate system. Thus the coordinates of the normal surface in any coordinate system can be determined without knowledge of the specific underlying coordinate system being used.
Note that if a mirrored vector class is being used (see NNormalSurfaceVectorMirrored), the vector may not change once the first coordinate lookup routine (such as getTriangleCoord() and the like) has been called. See NNormalSurfaceVectorMirrored for further explanation.
Note that non-compact surfaces (surfaces with infinitely many discs, such as spun-normal surfaces) are allowed; in these cases, the corresponding coordinate lookup routines should return NLargeInteger::infinity where appropriate.
All subclasses of NNormalSurfaceVector must have the following properties:
When deriving classes from NNormalSurfaceVector:
class(size_t length)
and class(const NVector<NLargeInteger>& cloneMe)
must be declared and implemented; these will usually just call the corresponding superclass constructors. void makeZeroVector(const NTriangulation*)
, NMatrixInt* makeMatchingEquations(NTriangulation*)
and makeEmbeddedConstraints(NTriangulation*) must be declared and implemented.
|
inline |
Creates a new vector all of whose entries are initialised to zero.
length | the number of elements in the new vector. |
|
inline |
Creates a new vector that is a clone of the given vector.
cloneMe | the vector to clone. |
|
inlinevirtual |
A virtual destructor.
This is required because here we introduce virtual functions into the NRay hierarchy.
|
pure virtual |
Determines if the specific underlying coordinate system allows for almost normal surfaces, that is, allows for octagonal discs.
Note that this has nothing to do with whether or not this specific surface contains octagonal discs.
true
if and only if almost normal surfaces are allowed.
|
pure virtual |
Determines if the specific underlying coordinate system allows for transversely oriented normal surfaces.
true
if and only if transverse orientations are supported.
|
pure virtual |
Determines if the specific underlying coordinate system allows for spun-normal surfaces; that is, surfaces with infinitely many triangles.
Note that this has nothing to do with whether or not this specific surface contains infinitely many triangles.
true
if and only if spun-normal surfaces are allowed.
|
pure virtual |
Creates a newly allocated clone of this vector.
The clone will be of the same subclass of NNormalSurfaceVector as this vector.
|
pure virtual |
Returns the number of times this normal surface crosses the given edge.
See NNormalSurface::getEdgeWeight() for further details.
edgeIndex | the index in the triangulation of the edge in which we are interested; this should be between 0 and NTriangulation::getNumberOfEdges()-1 inclusive. |
triang | the triangulation in which this normal surface lives. |
Implemented in regina::NNormalSurfaceVectorMirrored, regina::NNormalSurfaceVectorOriented, regina::NNormalSurfaceVectorANStandard, and regina::NNormalSurfaceVectorStandard.
|
inline |
A deprecated alias for getTriangleArcs().
This routine returns the number of arcs in which this normal surface intersects the given triangle in the given direction. See getTriangleArcs() for further details.
Since this is an alias only, it is non-virtual and cannot be overridden. Its implementation simply calls getTriangleArcs().
triIndex | the index in the triangulation of the triangle in which we are interested; this should be between 0 and NTriangulation::getNumberOfTriangles()-1 inclusive. |
triVertex | the vertex of the triangle (0, 1 or 2) around which the arcs of intersection that we are interested in lie; only these arcs will be counted. |
triang | the triangulation in which this normal surface lives. |
|
pure virtual |
Returns the number of octagonal discs of the given type in this normal surface.
See NNormalSurface::getOctCoord() for further details.
tetIndex | the index in the triangulation of the tetrahedron in which the requested octagons reside; this should be between 0 and NTriangulation::getNumberOfTetrahedra()-1 inclusive. |
octType | the number of the vertex splitting that this octagon type represents; this should be between 0 and 2 inclusive. |
triang | the triangulation in which this normal surface lives. |
Implemented in regina::NNormalSurfaceVectorMirrored, regina::NNormalSurfaceVectorOrientedQuad, regina::NNormalSurfaceVectorOriented, regina::NNormalSurfaceVectorANStandard, regina::NNormalSurfaceVectorStandard, and regina::NNormalSurfaceVectorQuad.
|
virtual |
Returns the number of oriented quadrilateral discs of the given type in this normal surface.
See NNormalSurface::getOrientedQuadCoord() for further details.
The default implementation of this routine returns zero, which is suitable for coordinate systems that do not support transverse orientation.
tetIndex | the index in the triangulation of the tetrahedron in which the requested quadrilaterals reside; this should be between 0 and NTriangulation::getNumberOfTetrahedra()-1 inclusive. |
quadType | the number of the vertex splitting that this quad type represents; this should be between 0 and 2 inclusive. |
triang | the triangulation in which this normal surface lives. |
orientation | the orientation of the normal discs. |
Reimplemented in regina::NNormalSurfaceVectorMirrored, regina::NNormalSurfaceVectorOrientedQuad, and regina::NNormalSurfaceVectorOriented.
|
virtual |
Returns the number of oriented triangular discs of the given type in this normal surface.
See NNormalSurface::getOrientedTriangleCoord() for further details.
The default implementation of this routine returns zero, which is suitable for coordinate systems that do not support transverse orientation.
tetIndex | the index in the triangulation of the tetrahedron in which the requested triangles reside; this should be between 0 and NTriangulation::getNumberOfTetrahedra()-1 inclusive. |
vertex | the vertex of the given tetrahedron around which the requested triangles lie; this should be between 0 and 3 inclusive. |
triang | the triangulation in which this normal surface lives. |
orientation | the orientation of the normal discs. |
Reimplemented in regina::NNormalSurfaceVectorMirrored, and regina::NNormalSurfaceVectorOriented.
|
pure virtual |
Returns the number of quadrilateral discs of the given type in this normal surface.
See NNormalSurface::getQuadCoord() for further details.
tetIndex | the index in the triangulation of the tetrahedron in which the requested quadrilaterals reside; this should be between 0 and NTriangulation::getNumberOfTetrahedra()-1 inclusive. |
quadType | the number of the vertex splitting that this quad type represents; this should be between 0 and 2 inclusive. |
triang | the triangulation in which this normal surface lives. |
Implemented in regina::NNormalSurfaceVectorMirrored, regina::NNormalSurfaceVectorOrientedQuad, regina::NNormalSurfaceVectorANStandard, regina::NNormalSurfaceVectorOriented, and regina::NNormalSurfaceVectorStandard.
|
pure virtual |
Returns the number of arcs in which this normal surface intersects the given triangle in the given direction.
See NNormalSurface::getTriangleArcs() for further details.
triIndex | the index in the triangulation of the triangle in which we are interested; this should be between 0 and NTriangulation::getNumberOfTriangles()-1 inclusive. |
triVertex | the vertex of the triangle (0, 1 or 2) around which the arcs of intersection that we are interested in lie; only these arcs will be counted. |
triang | the triangulation in which this normal surface lives. |
Implemented in regina::NNormalSurfaceVectorMirrored, regina::NNormalSurfaceVectorOriented, regina::NNormalSurfaceVectorANStandard, and regina::NNormalSurfaceVectorStandard.
|
pure virtual |
Returns the number of triangular discs of the given type in this normal surface.
See NNormalSurface::getTriangleCoord() for further details.
tetIndex | the index in the triangulation of the tetrahedron in which the requested triangles reside; this should be between 0 and NTriangulation::getNumberOfTetrahedra()-1 inclusive. |
vertex | the vertex of the given tetrahedron around which the requested triangles lie; this should be between 0 and 3 inclusive. |
triang | the triangulation in which this normal surface lives. |
Implemented in regina::NNormalSurfaceVectorMirrored, regina::NNormalSurfaceVectorANStandard, regina::NNormalSurfaceVectorOriented, and regina::NNormalSurfaceVectorStandard.
|
virtual |
Determines if this normal surface has more than one octagonal disc.
It may be assumed that at most one octagonal disc type exists in this surface. This routine will return true
if an octagonal type does exist and its coordinate is greater than one.
The default implementation for this routine simply calculates all the octagonal coordinates and returns as soon as a positive or negative result can be established. Subclasses of NNormalSurfaceVector should override this if they can provide a faster implementation.
If a subclass does not allow for almost normal surfaces, this routine will never be called and thus does not need to be overwritten.
triang | the triangulation in which this normal surface lives. |
true
if and only if there is an octagonal disc type present and its coordinate is greater than one.
|
virtual |
Determines if the normal surface represented is a central surface in the given triangulation.
A central surface is a compact surface containing at most one normal or almost normal disc per tetrahedron. If the surface is central, the number of tetrahedra it meets (i.e., the number of discs in the surface) will be returned.
The default implementation for this routine simply runs through and checks the count for each disc type. Subclasses of NNormalSurfaceVector should override this if they can provide a faster implementation.
triang | the triangulation in which this normal surface lives. |
|
virtual |
Determines if the normal surface represented is compact (has finitely many discs).
The default implementation for this routine simply runs through every disc type until a disc type with infinite disc count is found or all disc types have been examined. Subclasses of NNormalSurfaceVector should override this if they can provide a faster implementation.
triang | the triangulation in which this normal surface lives. |
true
if and only if the normal surface represented is compact.
|
virtual |
Determines if the normal surface represented is a splitting surface in the given triangulation.
A splitting surface is a compact surface containing precisely one quad per tetrahedron and no other normal (or almost normal) discs.
The default implementation for this routine simply runs through and checks the count for each disc type. Subclasses of NNormalSurfaceVector should override this if they can provide a faster implementation.
triang | the triangulation in which this normal surface lives. |
true
if and only if the normal surface represented is a splitting surface.
|
virtual |
Determines if a rational multiple of the normal surface represented is the thin link of a single edge.
If there are two different edges e1 and e2 for which the surface could be expressed as the thin link of either e1 or e2, the pair (e1,e2) will be returned. If the surface is the thin link of only one edge e, the pair (e,0) will be returned. If the surface is not the thin link of any edges, the pair (0,0) will be returned.
The default implementation for this routine involves counting the number of discs of every type. Subclasses of NNormalSurfaceVector should override this if they can provide a faster implementation.
triang | the triangulation in which this normal surface lives. |
|
virtual |
Determines if a rational multiple of the normal surface represented is the link of a single vertex.
The default implementation for this routine involves counting the number of discs of every type. Subclasses of NNormalSurfaceVector should override this if they can provide a faster implementation.
triang | the triangulation in which this normal surface lives. |
Reimplemented in regina::NNormalSurfaceVectorOrientedQuad, regina::NNormalSurfaceVectorQuadOct, and regina::NNormalSurfaceVectorQuad.
|
virtual |
Determines if the normal surface represented is vertex linking.
A vertex linking surface contains only triangles.
The default implementation for this routine simply runs through every non-triangular disc type ensuring that each has no corresponding discs. Subclasses of NNormalSurfaceVector should override this if they can provide a faster implementation.
triang | the triangulation in which this normal surface lives. |
true
if and only if the normal surface represented is vertex linking.
|
static |
Creates a new set of validity constraints representing the condition that normal surfaces be embedded.
The validity constraints will be expressed relative to the coordinate system corresponding to this particular subclass of NNormalSurfaceVector.
triangulation | the triangulation upon which these validity constraints will be based. |
|
static |
Creates a new set of normal surface matching equations for the given triangulation using the coordinate system corresponding to this particular subclass of NNormalSurfaceVector.
See makeMatchingEquations() for further details.
triangulation | the triangulation upon which these matching equations will be based. |
|
static |
Returns a new normal surface vector of the appropriate length for the given triangulation and for the coordinate system corresponding to this subclass of NNormalSurfaceVector.
All elements of the new vector will be initialised to zero.
See makeZeroVector() for further details.
triangulation | the triangulation upon which the underlying coordinate system is based. |