regina::NSVectorStandard Class Referenceabstract
Normal Surfaces

A normal surface vector using standard triangle-quad coordinates. More...

`#include <surfaces/nsvectorstandard.h>`

Inheritance diagram for regina::NSVectorStandard:

## Public Member Functions

| NSVectorStandard (size_t length)
| Creates a new vector all of whose entries are initialised to zero. More...
| NSVectorStandard (const Vector< LargeInteger > &cloneMe)
| Creates a new vector that is a clone of the given vector. More...
virtual LargeInteger | triangles (size_t tetIndex, int vertex, const Triangulation< 3 > *triang) const
| Returns the number of triangular discs of the given type in this normal surface. More...
virtual LargeInteger | quads (size_t tetIndex, int quadType, const Triangulation< 3 > *triang) const
| Returns the number of quadrilateral discs of the given type in this normal surface. More...
virtual LargeInteger | octs (size_t tetIndex, int octType, const Triangulation< 3 > *triang) const
| Returns the number of octagonal discs of the given type in this normal surface. More...
virtual LargeInteger | edgeWeight (size_t edgeIndex, const Triangulation< 3 > *triang) const
| Returns the number of times this normal surface crosses the given edge. More...
virtual LargeInteger | arcs (size_t triIndex, int triVertex, const Triangulation< 3 > *triang) const
| Returns the number of arcs in which this normal surface intersects the given triangle in the given direction. More...
const Ray & | coords () const
| Gives read-only access to the underlying vector of coordinates. More...
virtual NormalSurfaceVector * | clone () const =0
| Creates a newly allocated clone of this vector. More...
size_t | size () const
| Returns the number of coordinates in the underlying vector. More...
const NLargeInteger & | operator[] (size_t index) const
| Returns the given coordinate from the underlying vector. More...
virtual void | setElement (size_t index, const LargeInteger &value)
| Sets the given normal coordinate to the given value. More...
virtual void | operator+= (const NormalSurfaceVector &other)
| Adds the given vector to this vector. More...
virtual void | scaleDown ()
| Scales this vector down by the greatest common divisor of all its elements. 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 Triangulation< 3 > *triang) const
| Determines if this normal surface has more than one octagonal disc. More...
virtual bool | isCompact (const Triangulation< 3 > *triang) const
| Determines if the normal surface represented is compact (has finitely many discs). More...
virtual bool | isVertexLinking (const Triangulation< 3 > *triang) const
| Determines if the normal surface represented is vertex linking. More...
virtual const Vertex< 3 > * | isVertexLink (const Triangulation< 3 > *triang) const
| Determines if a rational multiple of the normal surface represented is the link of a single vertex. More...
virtual std::pair< const Edge< 3 > *, const Edge< 3 > * > | isThinEdgeLink (const Triangulation< 3 > *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 Triangulation< 3 > *triang) const
| Determines if the normal surface represented is a splitting surface in the given triangulation. More...
virtual LargeInteger | isCentral (const Triangulation< 3 > *triang) const
| Determines if the normal surface represented is a central surface in the given triangulation. More...
virtual LargeInteger | orientedTriangles (size_t tetIndex, int vertex, const Triangulation< 3 > *triang, bool orientation) const
| Returns the number of oriented triangular discs of the given type in this normal surface. More...
virtual LargeInteger | orientedQuads (size_t tetIndex, int quadType, const Triangulation< 3 > *triang, bool orientation) const
| Returns the number of oriented quadrilateral discs of the given type in this normal surface. More...

## Static Public Member Functions

static NormalSurfaceVector * | makeZeroVector (const Triangulation< 3 > *triangulation)
static MatrixInt * | makeMatchingEquations (const Triangulation< 3 > *triangulation)
static EnumConstraints * | makeEmbeddedConstraints (const Triangulation< 3 > *triangulation)

## Protected Attributes

Ray | coords_
| The raw vector of normal coordinates. More...

## Detailed Description

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 NormalSurface::quads()).

Python:
  Not present.

## Constructor & Destructor Documentation

## NSVectorStandard() [1/2]

regina::NSVectorStandard::NSVectorStandard | ( | size_t | length | ) |

inline

Creates a new vector all of whose entries are initialised to zero.

Parameters

  length | the number of elements in the new vector.

## NSVectorStandard() [2/2]

regina::NSVectorStandard::NSVectorStandard | ( | const Vector< LargeInteger > & | cloneMe | ) |

inline

Creates a new vector that is a clone of the given vector.

Parameters

  cloneMe | the vector to clone.

## Member Function Documentation

## allowsAlmostNormal()

virtual bool regina::NormalSurfaceVector::allowsAlmostNormal | ( |  | ) | const

pure virtual inherited

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.

Returns
  `true` if and only if almost normal surfaces are allowed.

## allowsOriented()

virtual bool regina::NormalSurfaceVector::allowsOriented | ( |  | ) | const

pure virtual inherited

Determines if the specific underlying coordinate system allows for transversely oriented normal surfaces.

Returns
  `true` if and only if transverse orientations are supported.

## allowsSpun()

virtual bool regina::NormalSurfaceVector::allowsSpun | ( |  | ) | const

pure virtual inherited

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.

Returns
  `true` if and only if spun-normal surfaces are allowed.

## arcs()

virtual LargeInteger regina::NSVectorStandard::arcs | ( | size_t | triIndex,
|  | int | triVertex,
|  | const Triangulation< 3 > * | triang
| ) |  | const

virtual

Returns the number of arcs in which this normal surface intersects the given triangle in the given direction.

See NormalSurface::arcs() for further details.

Parameters

  triIndex | the index in the triangulation of the triangle in which we are interested; this should be between 0 and Triangulation<3>::countTriangles()-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.

Returns
  the number of times this normal surface intersect the given triangle with the given arc type.

Implements regina::NormalSurfaceVector.

## clone()

virtual NormalSurfaceVector* regina::NormalSurfaceVector::clone | ( |  | ) | const

pure virtual inherited

Creates a newly allocated clone of this vector.

The clone will be of the same subclass of NormalSurfaceVector as this vector.

## coords()

const Ray & regina::NormalSurfaceVector::coords | ( |  | ) | const

inline inherited

Gives read-only access to the underlying vector of coordinates.

Returns
  the vector of coordinates.

## edgeWeight()

virtual LargeInteger regina::NSVectorStandard::edgeWeight | ( | size_t | edgeIndex,
|  | const Triangulation< 3 > * | triang
| ) |  | const

virtual

Returns the number of times this normal surface crosses the given edge.

See NormalSurface::edgeWeight() for further details.

Parameters

  edgeIndex | the index in the triangulation of the edge in which we are interested; this should be between 0 and Triangulation<3>::countEdges()-1 inclusive.
  triang | the triangulation in which this normal surface lives.

Returns
  the number of times this normal surface crosses the given edge.

Implements regina::NormalSurfaceVector.

## hasMultipleOctDiscs()

virtual bool regina::NormalSurfaceVector::hasMultipleOctDiscs | ( | const Triangulation< 3 > * | triang | ) | const

virtual inherited

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 NormalSurfaceVector 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.

Precondition
  At most one octagonal disc type exists in this surface.
  This normal surface vector is using a coordinate system that allows for almost normal surfaces.

Parameters

  triang | the triangulation in which this normal surface lives.

Returns
  `true` if and only if there is an octagonal disc type present and its coordinate is greater than one.

## isCentral()

virtual LargeInteger regina::NormalSurfaceVector::isCentral | ( | const Triangulation< 3 > * | triang | ) | const

virtual inherited

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 NormalSurfaceVector should override this if they can provide a faster implementation.

Parameters

  triang | the triangulation in which this normal surface lives.

Returns
  the number of tetrahedra that the surface meets if it is a central surface, or 0 if it is not a central surface.

## isCompact()

virtual bool regina::NormalSurfaceVector::isCompact | ( | const Triangulation< 3 > * | triang | ) | const

virtual inherited

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 NormalSurfaceVector should override this if they can provide a faster implementation.

Parameters

  triang | the triangulation in which this normal surface lives.

Returns
  `true` if and only if the normal surface represented is compact.

## isSplitting()

virtual bool regina::NormalSurfaceVector::isSplitting | ( | const Triangulation< 3 > * | triang | ) | const

virtual inherited

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 NormalSurfaceVector should override this if they can provide a faster implementation.

Parameters

  triang | the triangulation in which this normal surface lives.

Returns
  `true` if and only if the normal surface represented is a splitting surface.

## isThinEdgeLink()

virtual std::pair<const Edge<3>*, const Edge<3>*> regina::NormalSurfaceVector::isThinEdgeLink | ( | const Triangulation< 3 > * | triang | ) | const

virtual inherited

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 NormalSurfaceVector should override this if they can provide a faster implementation.

Parameters

  triang | the triangulation in which this normal surface lives.

Returns
  a pair containing the edge(s) linked by this surface, as described above.

## isVertexLink()

virtual const Vertex<3>* regina::NormalSurfaceVector::isVertexLink | ( | const Triangulation< 3 > * | triang | ) | const

virtual inherited

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 NormalSurfaceVector should override this if they can provide a faster implementation.

Parameters

  triang | the triangulation in which this normal surface lives.

Returns
  the vertex linked by this surface, or 0 if this surface is not the link of a single vertex.

Reimplemented in regina::NSVectorOrientedQuad, regina::NSVectorQuadOct, and regina::NSVectorQuad.

## isVertexLinking()

virtual bool regina::NormalSurfaceVector::isVertexLinking | ( | const Triangulation< 3 > * | triang | ) | const

virtual inherited

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 NormalSurfaceVector should override this if they can provide a faster implementation.

Parameters

  triang | the triangulation in which this normal surface lives.

Returns
  `true` if and only if the normal surface represented is vertex linking.

## octs()

LargeInteger regina::NSVectorStandard::octs | ( | size_t | tetIndex,
|  | int | octType,
|  | const Triangulation< 3 > * | triang
| ) |  | const

inline virtual

Returns the number of octagonal discs of the given type in this normal surface.

See NormalSurface::octs() for further details.

Parameters

  tetIndex | the index in the triangulation of the tetrahedron in which the requested octagons reside; this should be between 0 and Triangulation<3>::size()-1 inclusive.
  octType | the type of this octagon in the given tetrahedron; this should be 0, 1 or 2.
  triang | the triangulation in which this normal surface lives.

Returns
  the number of octagonal discs of the given type.

Implements regina::NormalSurfaceVector.

## operator+=()

void regina::NormalSurfaceVector::operator+= | ( | const NormalSurfaceVector & | other | ) |

inline virtual inherited

Adds the given vector to this vector.

This behaves correctly in the case where other is this.

The default implementation simply adds the coordinates of the underlying vectors. Subclasses should reimplement this if they carry any additional information that also needs adjusting.

Precondition
  This and the given vector represent normal surfaces in the same triangulation, and use the same normal coordinate system.

Parameters

  other | the vector to add to this vector.

Reimplemented in regina::NSVectorMirrored.

## operator[]()

const NLargeInteger & regina::NormalSurfaceVector::operator[] | ( | size_t | index | ) | const

inline inherited

Returns the given coordinate from the underlying vector.

Parameters

  index | the index of the coordinate to retrieve; this must be between 0 and size()-1 inclusive.

Returns
  the coordinate at the given index.

## orientedQuads()

virtual LargeInteger regina::NormalSurfaceVector::orientedQuads | ( | size_t | tetIndex,
|  | int | quadType,
|  | const Triangulation< 3 > * | triang,
|  | bool | orientation
| ) |  | const

virtual inherited

Returns the number of oriented quadrilateral discs of the given type in this normal surface.

See NormalSurface::orientedQuads() for further details.

The default implementation of this routine returns zero, which is suitable for coordinate systems that do not support transverse orientation.

Parameters

  tetIndex | the index in the triangulation of the tetrahedron in which the requested quadrilaterals reside; this should be between 0 and Triangulation<3>::size()-1 inclusive.
  quadType | the type of this quadrilateral in the given tetrahedron; this should be 0, 1 or 2.
  triang | the triangulation in which this normal surface lives.
  orientation | the orientation of the normal discs.

Returns
  the number of quadrilateral discs of the given type.

Reimplemented in regina::NSVectorMirrored, regina::NSVectorOrientedQuad, and regina::NSVectorOriented.

## orientedTriangles()

virtual LargeInteger regina::NormalSurfaceVector::orientedTriangles | ( | size_t | tetIndex,
|  | int | vertex,
|  | const Triangulation< 3 > * | triang,
|  | bool | orientation
| ) |  | const

virtual inherited

Returns the number of oriented triangular discs of the given type in this normal surface.

See NormalSurface::orientedTriangles() for further details.

The default implementation of this routine returns zero, which is suitable for coordinate systems that do not support transverse orientation.

Parameters

  tetIndex | the index in the triangulation of the tetrahedron in which the requested triangles reside; this should be between 0 and Triangulation<3>::size()-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.

Returns
  the number of triangular discs of the given type.

Reimplemented in regina::NSVectorMirrored, and regina::NSVectorOriented.

## quads()

LargeInteger regina::NSVectorStandard::quads | ( | size_t | tetIndex,
|  | int | quadType,
|  | const Triangulation< 3 > * | triang
| ) |  | const

inline virtual

Returns the number of quadrilateral discs of the given type in this normal surface.

See NormalSurface::quads() for further details.

Parameters

  tetIndex | the index in the triangulation of the tetrahedron in which the requested quadrilaterals reside; this should be between 0 and Triangulation<3>::size()-1 inclusive.
  quadType | the type of this quadrilateral in the given tetrahedron; this should be 0, 1 or 2.
  triang | the triangulation in which this normal surface lives.

Returns
  the number of quadrilateral discs of the given type.

Implements regina::NormalSurfaceVector.

## scaleDown()

void regina::NormalSurfaceVector::scaleDown | ( |  | ) |

inline virtual 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 poses no problem for vectors containing infinite elements; such elements are simply ignored and left at infinity.

The default implementation simply scales down the underlying vector. Subclasses should reimplement this if they carry any additional information that also needs adjusting.

Reimplemented in regina::NSVectorMirrored.

## setElement()

void regina::NormalSurfaceVector::setElement | ( | size_t | index,
|  | const LargeInteger & | value
| ) |  |

inline virtual inherited

Sets the given normal coordinate to the given value.

The default implementation simply sets the coordinate in the underlying vector. Subclasses should reimplement this if they carry any additional information that also need adjusting.

Parameters

  index | the index of the coordinate to set; this must be between 0 and size()-1 inclusive.
  value | the new value to assign to the given coordinate.

Reimplemented in regina::NSVectorMirrored.

## size()

size_t regina::NormalSurfaceVector::size | ( |  | ) | const

inline inherited

Returns the number of coordinates in the underlying vector.

Returns
  the number of coordinates.

## triangles()

LargeInteger regina::NSVectorStandard::triangles | ( | size_t | tetIndex,
|  | int | vertex,
|  | const Triangulation< 3 > * | triang
| ) |  | const

inline virtual

Returns the number of triangular discs of the given type in this normal surface.

See NormalSurface::triangles() for further details.

Parameters

  tetIndex | the index in the triangulation of the tetrahedron in which the requested triangles reside; this should be between 0 and Triangulation<3>::size()-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.

Returns
  the number of triangular discs of the given type.

Implements regina::NormalSurfaceVector.

## Member Data Documentation

## coords_

Ray regina::NormalSurfaceVector::coords_

protected inherited

The raw vector of normal coordinates.

The documentation for this class was generated from the following file:

- surfaces/nsvectorstandard.h

Copyright © 1999-2016, The Regina development team
This software is released under the GNU General Public License, with some additional permissions; see the source code for details.
For further information, or to submit a bug or other problem, please contact Ben Burton (bab@maths.uq.edu.au).