Regina Calculation Engine
|
A normal surface vector that is mirrored in another coordinate system to avoid frequent lengthy calculations. More...
#include <surfaces/nsmirrored.h>
Public Member Functions | |
NNormalSurfaceVectorMirrored (unsigned length) | |
Creates a new vector all of whose entries are initialised to zero. | |
NNormalSurfaceVectorMirrored (const NVector< NLargeInteger > &cloneMe) | |
Creates a new vector that is a clone of the given vector. | |
NNormalSurfaceVectorMirrored (const NNormalSurfaceVectorMirrored &cloneMe) | |
Creates a new vector that is a clone of the given vector. | |
virtual | ~NNormalSurfaceVectorMirrored () |
Destroys this vector and its mirror if appropriate. | |
virtual NNormalSurfaceVector * | makeMirror (NTriangulation *triang) const =0 |
Creates a new mirror vector corresponding to this vector. | |
virtual NLargeInteger | getTriangleCoord (unsigned long tetIndex, int vertex, NTriangulation *triang) const |
Returns the number of triangular discs of the given type in this normal surface. | |
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. | |
virtual NLargeInteger | getQuadCoord (unsigned long tetIndex, int quadType, NTriangulation *triang) const |
Returns the number of quadrilateral discs of the given type in this normal surface. | |
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. | |
virtual NLargeInteger | getOctCoord (unsigned long tetIndex, int octType, NTriangulation *triang) const |
Returns the number of octagonal discs of the given type in this normal surface. | |
virtual NLargeInteger | getEdgeWeight (unsigned long edgeIndex, NTriangulation *triang) const |
Returns the number of times this normal surface crosses the given edge. | |
virtual NLargeInteger | getFaceArcs (unsigned long faceIndex, int faceVertex, NTriangulation *triang) const |
Returns the number of arcs in which this normal surface intersects the given face in the given direction. | |
![]() | |
NNormalSurfaceVector (unsigned length) | |
Creates a new vector all of whose entries are initialised to zero. | |
NNormalSurfaceVector (const NVector< NLargeInteger > &cloneMe) | |
Creates a new vector that is a clone of the given vector. | |
virtual | ~NNormalSurfaceVector () |
A virtual destructor. | |
virtual NNormalSurfaceVector * | clone () const =0 |
Creates a newly allocated clone of this vector. | |
virtual bool | allowsAlmostNormal () const =0 |
Determines if the specific underlying coordinate system allows for almost normal surfaces, that is, allows for octagonal discs. | |
virtual bool | allowsSpun () const =0 |
Determines if the specific underlying coordinate system allows for spun-normal surfaces; that is, surfaces with infinitely many triangles. | |
virtual bool | allowsOriented () const =0 |
Determines if the specific underlying coordinate system allows for transversely oriented normal surfaces. | |
virtual bool | hasMultipleOctDiscs (NTriangulation *triang) const |
Determines if this normal surface has more than one octagonal disc. | |
virtual bool | isCompact (NTriangulation *triang) const |
Determines if the normal surface represented is compact (has finitely many discs). | |
virtual bool | isVertexLinking (NTriangulation *triang) const |
Determines if the normal surface represented is vertex linking. | |
virtual const NVertex * | isVertexLink (NTriangulation *triang) const |
Determines if a rational multiple of the normal surface represented is the link of a single vertex. | |
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. | |
virtual bool | isSplitting (NTriangulation *triang) const |
Determines if the normal surface represented is a splitting surface in the given triangulation. | |
virtual NLargeInteger | isCentral (NTriangulation *triang) const |
Determines if the normal surface represented is a central surface in the given triangulation. | |
![]() | |
NRay (unsigned length) | |
Creates a new ray all of whose coordinates are initialised to zero. | |
NRay (const NVector< NLargeInteger > &cloneMe) | |
Creates a new ray that is a clone of the given ray. | |
void | scaleDown () |
Scales this vector down by the greatest common divisor of all its elements. | |
void | negate () |
Negates every element of this vector. | |
![]() | |
NVector (unsigned newVectorSize) | |
Creates a new vector. | |
NVector (unsigned newVectorSize, const NLargeInteger &initValue) | |
Creates a new vector and initialises every element to the given value. | |
NVector (const NVector< NLargeInteger > &cloneMe) | |
Creates a new vector that is a clone of the given vector. | |
~NVector () | |
Destroys this vector. | |
unsigned | size () const |
Returns the number of elements in the vector. | |
const NLargeInteger & | operator[] (unsigned index) const |
Returns the element at the given index in the vector. | |
void | setElement (unsigned index, const NLargeInteger &value) |
Sets the element at the given index in the vector to the given value. | |
bool | operator== (const NVector< NLargeInteger > &compare) const |
Determines if this vector is equal to the given vector. | |
NVector< NLargeInteger > & | operator= (const NVector< NLargeInteger > &cloneMe) |
Sets this vector equal to the given vector. | |
void | operator+= (const NVector< NLargeInteger > &other) |
Adds the given vector to this vector. | |
void | operator-= (const NVector< NLargeInteger > &other) |
Subtracts the given vector from this vector. | |
void | operator*= (const NLargeInteger &factor) |
Multiplies this vector by the given scalar. | |
NLargeInteger | operator* (const NVector< NLargeInteger > &other) const |
Calculates the dot product of this vector and the given vector. | |
NLargeInteger | norm () const |
Returns the norm of this vector. | |
NLargeInteger | elementSum () const |
Returns the sum of all elements of this vector. | |
void | addCopies (const NVector< NLargeInteger > &other, const NLargeInteger &multiple) |
Adds the given multiple of the given vector to this vector. | |
void | subtractCopies (const NVector< NLargeInteger > &other, const NLargeInteger &multiple) |
Subtracts the given multiple of the given vector to this vector. |
Additional Inherited Members | |
![]() | |
static NNormalSurfaceVector * | makeZeroVector (const NTriangulation *triangulation) |
Returns a new normal surface vector of the appropriate length for the given triangulation and for the flavour of coordinate system corresponding to this subclass of NNormalSurfaceVector. | |
static NMatrixInt * | makeMatchingEquations (NTriangulation *triangulation) |
Creates a new set of normal surface matching equations for the given triangulation using the flavour of coordinate system corresponding to this particular subclass of NNormalSurfaceVector. | |
static NEnumConstraintList * | makeEmbeddedConstraints (NTriangulation *triangulation) |
Creates a new set of validity constraints representing the condition that normal surfaces be embedded. |
A normal surface vector that is mirrored in another coordinate system to avoid frequent lengthy calculations.
When it is difficult to convert from the native coordinate system to standard tri-quad-oct coordinates, use this as a base class. The conversion of the entire vector will be done once only, and future coordinate lookups will be performed through the pre-converted mirror vector.
Once the first coordinate lookup has taken place (via getTriangleCoord() or the like), this vector may not change! The mirror will be created at this point and will not change, so if the native coordinates change further then any requests passed to the mirror will return incorrect results.
Subclasses need not implement any of the coordinate lookup routines. The default implementation will be to pass the lookup to the mirror. If any particular lookup can be done more efficiently in the native coordinate system, the corresponding routine should be overridden.
Subclasses must however implement the routine makeMirror() which creates the alternate mirror vector from this vector.
Note that cloning a vector of this class will not clone the mirror. Thus a clone may be safely modified before its first coordinate lookup routine is called.
|
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. |
|
inline |
Creates a new vector that is a clone of the given vector.
cloneMe | the vector to clone. |
|
inlinevirtual |
Destroys this vector and its mirror if appropriate.
|
inlinevirtual |
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.
|
inlinevirtual |
Returns the number of arcs in which this normal surface intersects the given face in the given direction.
See NNormalSurface::getFaceArcs() for further details.
faceIndex | the index in the triangulation of the face in which we are interested; this should be between 0 and NTriangulation::getNumberOfFaces()-1 inclusive. |
faceVertex | the vertex of the face (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 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.
Reimplemented in regina::NNormalSurfaceVectorOrientedQuad, and regina::NNormalSurfaceVectorQuad.
|
inlinevirtual |
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 from regina::NNormalSurfaceVector.
Reimplemented in regina::NNormalSurfaceVectorOrientedQuad.
|
inlinevirtual |
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 from regina::NNormalSurfaceVector.
|
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.
Reimplemented in regina::NNormalSurfaceVectorOrientedQuad.
|
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.
|
pure virtual |
Creates a new mirror vector corresponding to this vector.
The mirror vector should represent the same normal surface as this vector, and should have fast coordinate lookup routines (getTriangleCoord(), getQuadCord() and so on). It is recommended that the mirror vector be an NNormalSurfaceVectorStandard or an NNormalSurfaceVectorANStandard.
triang | the triangulation in which this normal surface lives. |
Implemented in regina::NNormalSurfaceVectorOrientedQuad, regina::NNormalSurfaceVectorQuadOct, and regina::NNormalSurfaceVectorQuad.