A normal surface vector that is mirrored in another coordinate system to avoid frequent lengthy calculations. More...
#include <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 | 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 | 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. |
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.
regina::NNormalSurfaceVectorMirrored::NNormalSurfaceVectorMirrored | ( | unsigned | length ) | [inline] |
Creates a new vector all of whose entries are initialised to zero.
length | the number of elements in the new vector. |
regina::NNormalSurfaceVectorMirrored::NNormalSurfaceVectorMirrored | ( | const NVector< NLargeInteger > & | cloneMe ) | [inline] |
Creates a new vector that is a clone of the given vector.
cloneMe | the vector to clone. |
regina::NNormalSurfaceVectorMirrored::NNormalSurfaceVectorMirrored | ( | const NNormalSurfaceVectorMirrored & | cloneMe ) | [inline] |
Creates a new vector that is a clone of the given vector.
cloneMe | the vector to clone. |
regina::NNormalSurfaceVectorMirrored::~NNormalSurfaceVectorMirrored | ( | ) | [inline, virtual] |
Destroys this vector and its mirror if appropriate.
NLargeInteger regina::NNormalSurfaceVectorMirrored::getEdgeWeight | ( | unsigned long | edgeIndex, |
NTriangulation * | triang | ||
) | const [inline, 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.
NLargeInteger regina::NNormalSurfaceVectorMirrored::getFaceArcs | ( | unsigned long | faceIndex, |
int | faceVertex, | ||
NTriangulation * | triang | ||
) | const [inline, virtual] |
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.
NLargeInteger regina::NNormalSurfaceVectorMirrored::getOctCoord | ( | unsigned long | tetIndex, |
int | octType, | ||
NTriangulation * | triang | ||
) | const [inline, 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. |
Implements regina::NNormalSurfaceVector.
Reimplemented in regina::NNormalSurfaceVectorQuad.
NLargeInteger regina::NNormalSurfaceVectorMirrored::getQuadCoord | ( | unsigned long | tetIndex, |
int | quadType, | ||
NTriangulation * | triang | ||
) | const [inline, 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. |
Implements regina::NNormalSurfaceVector.
NLargeInteger regina::NNormalSurfaceVectorMirrored::getTriangleCoord | ( | unsigned long | tetIndex, |
int | vertex, | ||
NTriangulation * | triang | ||
) | const [inline, 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. |
Implements regina::NNormalSurfaceVector.
virtual NNormalSurfaceVector* regina::NNormalSurfaceVectorMirrored::makeMirror | ( | NTriangulation * | triang ) | const [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::NNormalSurfaceVectorQuad, and regina::NNormalSurfaceVectorQuadOct.