Regina Calculation Engine
|
A normal surface vector using standard triangle-quad coordinates. More...
#include <surfaces/nsstandard.h>
Public Member Functions | |
NNormalSurfaceVectorStandard (size_t length) | |
Creates a new vector all of whose entries are initialised to zero. More... | |
NNormalSurfaceVectorStandard (const NVector< NLargeInteger > &cloneMe) | |
Creates a new vector that is a clone of the given vector. More... | |
virtual NLargeInteger | getTriangleCoord (unsigned long tetIndex, int vertex, const NTriangulation *triang) const |
Returns the number of triangular discs of the given type in this normal surface. More... | |
virtual NLargeInteger | getQuadCoord (unsigned long tetIndex, int quadType, const NTriangulation *triang) const |
Returns the number of quadrilateral discs of the given type in this normal surface. More... | |
virtual NLargeInteger | getOctCoord (unsigned long tetIndex, int octType, const NTriangulation *triang) const |
Returns the number of octagonal discs of the given type in this normal surface. More... | |
virtual NLargeInteger | getEdgeWeight (unsigned long edgeIndex, const NTriangulation *triang) const |
Returns the number of times this normal surface crosses the given edge. More... | |
virtual NLargeInteger | getTriangleArcs (unsigned long triIndex, int triVertex, const NTriangulation *triang) const |
Returns the number of arcs in which this normal surface intersects the given triangle in the given direction. 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 (const NTriangulation *triang) const |
Determines if this normal surface has more than one octagonal disc. More... | |
virtual bool | isCompact (const NTriangulation *triang) const |
Determines if the normal surface represented is compact (has finitely many discs). More... | |
virtual bool | isVertexLinking (const NTriangulation *triang) const |
Determines if the normal surface represented is vertex linking. More... | |
virtual const NVertex * | isVertexLink (const 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 (const 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 (const NTriangulation *triang) const |
Determines if the normal surface represented is a splitting surface in the given triangulation. More... | |
virtual NLargeInteger | isCentral (const NTriangulation *triang) const |
Determines if the normal surface represented is a central surface in the given triangulation. More... | |
virtual NLargeInteger | getOrientedTriangleCoord (unsigned long tetIndex, int vertex, const NTriangulation *triang, bool orientation) const |
Returns the number of oriented triangular discs of the given type in this normal surface. More... | |
virtual NLargeInteger | getOrientedQuadCoord (unsigned long tetIndex, int quadType, const NTriangulation *triang, bool orientation) const |
Returns the number of oriented quadrilateral discs of the given type in this normal surface. More... | |
NLargeInteger | getFaceArcs (unsigned long triIndex, int triVertex, const NTriangulation *triang) const |
A deprecated alias for getTriangleArcs(). 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... | |
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... | |
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... | |
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) |
static NMatrixInt * | makeMatchingEquations (const NTriangulation *triangulation) |
static NEnumConstraintList * | makeEmbeddedConstraints (const NTriangulation *triangulation) |
Static Public Attributes | |
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... | |
Protected Attributes | |
NLargeInteger * | elements |
The internal array containing all vector elements. More... | |
NLargeInteger * | end |
A pointer just beyond the end of the internal array. More... | |
A normal surface vector using standard triangle-quad coordinates.
If there are t tetrahedra in the underlying triangulation, there must be precisely 7t coordinates. The first seven coordinates will be for the first tetrahedron, the next seven for the second tetrahedron and so on. For each tetrahedron, the first four represent the number of triangular discs about vertex 0, 1, 2 and 3, and the next three represent the number of quadrilateral discs of type 0, 1 and 2 (see NNormalSurface::getQuadCoord()).
|
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. |
|
inlineinherited |
Adds the given multiple of the given vector to this vector.
other | the vector a multiple of which will be added to this vector. |
multiple | the multiple of other to be added to this vector. |
|
pure virtualinherited |
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 virtualinherited |
Determines if the specific underlying coordinate system allows for transversely oriented normal surfaces.
true
if and only if transverse orientations are supported.
|
pure virtualinherited |
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 virtualinherited |
Creates a newly allocated clone of this vector.
The clone will be of the same subclass of NNormalSurfaceVector as this vector.
|
inlineinherited |
Returns the sum of all elements of this vector.
|
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. |
Implements regina::NNormalSurfaceVector.
|
inlineinherited |
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. |
|
inlinevirtual |
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. |
Implements regina::NNormalSurfaceVector.
|
virtualinherited |
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.
|
virtualinherited |
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.
|
inlinevirtual |
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. |
Implements regina::NNormalSurfaceVector.
|
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. |
Implements regina::NNormalSurfaceVector.
|
inlinevirtual |
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. |
Implements regina::NNormalSurfaceVector.
|
virtualinherited |
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.
|
virtualinherited |
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. |
|
virtualinherited |
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.
|
virtualinherited |
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.
|
virtualinherited |
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. |
|
virtualinherited |
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.
|
virtualinherited |
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.
|
inlineinherited |
Negates every element of this vector.
This is an optimised implementation that overrides NVector<NLargeInteger>::negate().
|
inlineinherited |
Returns the norm of this vector.
This is the dot product of the vector with itself.
|
inlineinherited |
Calculates the dot product of this vector and the given vector.
other | the vector with which this will be multiplied. |
|
inlineinherited |
Multiplies this vector by the given scalar.
factor | the scalar with which this will be multiplied. |
|
inlineinherited |
Adds the given vector to this vector.
other | the vector to add to this vector. |
|
inlineinherited |
Subtracts the given vector from this vector.
other | the vector to subtract from this vector. |
|
inlineinherited |
Determines if this vector is equal to the given vector.
compare | the vector with which this will be compared. |
true
if and only if the this and the given vector are equal.
|
inlineinherited |
Returns the element at the given index in the vector.
A constant reference to the element is returned; the element may not be altered.
index
is between 0 and size()-1 inclusive.index | the vector index to examine. |
|
inherited |
Scales this vector down by the greatest common divisor of all its elements.
The resulting vector will be the smallest multiple of the original that maintains integral entries, and these entries will have the same signs as the originals.
This routine thus reduces a ray to its smallest possible representation.
This routine poses no problem for vectors containing infinite elements; such elements are simply ignored and left at infinity.
|
inlineinherited |
Sets the element at the given index in the vector to the given value.
index
is between 0 and size()-1 inclusive.index | the vector index to examine. |
value | the new value to assign to the element. |
|
inlineinherited |
Returns the number of elements in the vector.
|
inlineinherited |
Subtracts the given multiple of the given vector to this vector.
other | the vector a multiple of which will be subtracted from this vector. |
multiple | the multiple of other to be subtracted from this vector. |
|
protectedinherited |
The internal array containing all vector elements.
|
protectedinherited |
A pointer just beyond the end of the internal array.
The size of the vector can be computed as (end - elements).
|
staticinherited |
Negative one in the underlying number system.
This would be const
if it weren't for the fact that some compilers don't like this. It should never be modified!
|
staticinherited |
One in the underlying number system.
This would be const
if it weren't for the fact that some compilers don't like this. It should never be modified!
|
staticinherited |
Zero in the underlying number system.
This would be const
if it weren't for the fact that some compilers don't like this. It should never be modified!