regina::NormalHypersurfaceVector Class Referenceabstract
Normal Hypersurfaces

Stores the vector of a single normal hypersurface in a 4-manifold triangulation. More...

`#include <hypersurface/normalhypersurface.h>`

Inheritance diagram for regina::NormalHypersurfaceVector:

## Public Member Functions

| NormalHypersurfaceVector (size_t length)
| Creates a new vector all of whose entries are initialised to zero. More...
| NormalHypersurfaceVector (const Vector< LargeInteger > &cloneMe)
| Creates a new vector that is a clone of the given vector. More...
virtual | ~NormalHypersurfaceVector ()
| A virtual destructor. More...
const Ray & | coords () const
| Gives read-only access to the underlying vector of coordinates. More...
virtual NormalHypersurfaceVector * | 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 NormalHypersurfaceVector &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 | isCompact (const Triangulation< 4 > *triang) const
| Determines if the normal hypersurface represented is compact (has finitely many pieces). More...
virtual bool | isVertexLinking (const Triangulation< 4 > *triang) const
| Determines if the normal hypersurface represented is vertex linking. More...
virtual const Vertex< 4 > * | isVertexLink (const Triangulation< 4 > *triang) const
| Determines if a rational multiple of the normal hypersurface represented is the link of a single vertex. More...
virtual const Edge< 4 > * | isThinEdgeLink (const Triangulation< 4 > *triang) const
| Determines if a rational multiple of the normal hypersurface represented is the thin link of a single edge. More...
virtual LargeInteger | tetrahedra (size_t pentIndex, int vertex, const Triangulation< 4 > *triang) const =0
| Returns the number of tetrahedron pieces of the given type in this normal hypersurface. More...
virtual LargeInteger | prisms (size_t pentIndex, int prismType, const Triangulation< 4 > *triang) const =0
| Returns the number of prism pieces of the given type in this normal hypersurface. More...
virtual LargeInteger | edgeWeight (size_t edgeIndex, const Triangulation< 4 > *triang) const =0
| Returns the number of times this normal hypersurface crosses the given edge. More...

## Static Public Member Functions

static NormalHypersurfaceVector * | makeZeroVector (const Triangulation< 4 > *triangulation)
| Returns a new normal hypersurface vector of the appropriate length for the given triangulation and for the coordinate system corresponding to this subclass of NormalHypersurfaceVector. More...
static MatrixInt * | makeMatchingEquations (const Triangulation< 4 > *triangulation)
| Creates a new set of normal hypersurface matching equations for the given triangulation using the coordinate system corresponding to this particular subclass of NormalHypersurfaceVector. More...
static EnumConstraints * | makeEmbeddedConstraints (const Triangulation< 4 > *triangulation)
| Creates a new set of validity constraints representing the condition that normal hypersurfaces be embedded. More...

## Protected Attributes

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

## Detailed Description

Stores the vector of a single normal hypersurface in a 4-manifold triangulation.

The different subclasses of NormalHypersurfaceVector 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 hypersurface in any coordinate system can be determined without knowledge of the specific underlying coordinate system being used.

Note that non-compact hypersurfaces (surfaces with infinitely many pieces) are allowed; in these cases, the corresponding coordinate lookup routines should return LargeInteger::infinity where appropriate.

All subclasses of NormalHypersurfaceVector must have the following properties:

- Normal hypersurfaces can be enumerated by intersecting the non-negative orthant of the underlying vector space with some linear subspace;
- Adding two normal hypersurfaces corresponds to adding the two underlying vectors.

When deriving classes from NormalHypersurfaceVector:

- A new value must be added to the HyperCoords enum in hypercoords.h to represent the new coordinate system.
- The file hscoordregistry-impl.h must be updated to reflect the new coordinate system (the file itself contains instructions on how to do this).
- A corresponding specialisation of HyperInfo<> must be defined, typically in the same header as the new vector subclass.
- The macro REGINA_NORMAL_HYPERSURFACE_FLAVOUR must be added to the beginning of the new vector subclass. This will declare and define various constants, typedefs and virtual functions (see the REGINA_NORMAL_HYPERSURFACE_FLAVOUR macro documentation for details).
- Constructors `class(size_t length)` and `class(const Vector<LargeInteger>& cloneMe)` must be declared and implemented; these will usually just call the corresponding superclass constructors.
- All abstract functions must be implemented, except for those already provided by REGINA_NORMAL_HYPERSURFACE_FLAVOUR. Note that coordinate functions such as tetrahedra() must return the total number of pieces of the requested type; if your new coordinate system adorns pieces with extra information (such as orientation) then your implementation must compute the appropriate sum.
- Static public functions `void makeZeroVector(const Triangulation<4>*)`, `MatrixInt* makeMatchingEquations(const Triangulation<4>*)` and makeEmbeddedConstraints(const Triangulation<4>*) must be declared and implemented.

Python:
  Not present.

## Constructor & Destructor Documentation

## NormalHypersurfaceVector() [1/2]

regina::NormalHypersurfaceVector::NormalHypersurfaceVector | ( | 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.

## NormalHypersurfaceVector() [2/2]

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

inline

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

Parameters

  cloneMe | the vector to clone.

## ~NormalHypersurfaceVector()

regina::NormalHypersurfaceVector::~NormalHypersurfaceVector | ( |  | ) |

inline virtual

A virtual destructor.

This is required because here we introduce virtual functions into the Ray hierarchy.

## Member Function Documentation

## clone()

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

pure virtual

Creates a newly allocated clone of this vector.

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

## coords()

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

inline

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

Returns
  the vector of coordinates.

## edgeWeight()

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

pure virtual

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

See NormalHypersurface::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<4>::countEdges()-1 inclusive.
  triang | the triangulation in which this normal hypersurface lives.

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

Implemented in regina::HSVectorStandard.

## isCompact()

virtual bool regina::NormalHypersurfaceVector::isCompact | ( | const Triangulation< 4 > * | triang | ) | const

virtual

Determines if the normal hypersurface represented is compact (has finitely many pieces).

The default implementation for this routine simply runs through every piece type until a piece type with infinite piece count is found or all piece types have been examined. Subclasses of NormalHypersurfaceVector should override this if they can provide a faster implementation.

Parameters

  triang | the triangulation in which this normal hypersurface lives.

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

## isThinEdgeLink()

virtual const Edge<4>* regina::NormalHypersurfaceVector::isThinEdgeLink | ( | const Triangulation< 4 > * | triang | ) | const

virtual

Determines if a rational multiple of the normal hypersurface represented is the thin link of a single edge.

The default implementation for this routine involves counting the number of pieces of every type. Subclasses of NormalHypersurfaceVector should override this if they can provide a faster implementation.

Parameters

  triang | the triangulation in which this normal hypersurface lives.

Returns
  the edge linked by this hypersurface, or 0 if this hypersurface is not a thin edge link.

## isVertexLink()

virtual const Vertex<4>* regina::NormalHypersurfaceVector::isVertexLink | ( | const Triangulation< 4 > * | triang | ) | const

virtual

Determines if a rational multiple of the normal hypersurface represented is the link of a single vertex.

The default implementation for this routine involves counting the number of pieces of every type. Subclasses of NormalSurfaceVector should override this if they can provide a faster implementation.

Parameters

  triang | the triangulation in which this normal hypersurface lives.

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

## isVertexLinking()

virtual bool regina::NormalHypersurfaceVector::isVertexLinking | ( | const Triangulation< 4 > * | triang | ) | const

virtual

Determines if the normal hypersurface represented is vertex linking.

A vertex linking hypersurface contains only tetrahedra.

The default implementation for this routine simply runs through every non-tetrahedron piece type ensuring that each has no corresponding pieces. Subclasses of NormalHypersurfaceVector should override this if they can provide a faster implementation.

Parameters

  triang | the triangulation in which this normal hypersurface lives.

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

## makeEmbeddedConstraints()

static EnumConstraints* regina::NormalHypersurfaceVector::makeEmbeddedConstraints | ( | const Triangulation< 4 > * | triangulation | ) |

static

Creates a new set of validity constraints representing the condition that normal hypersurfaces be embedded.

The validity constraints will be expressed relative to the coordinate system corresponding to this particular subclass of NormalHypersurfaceVector.

Parameters

  triangulation | the triangulation upon which these validity constraints will be based.

Returns
  a newly allocated set of constraints.

## makeMatchingEquations()

static MatrixInt* regina::NormalHypersurfaceVector::makeMatchingEquations | ( | const Triangulation< 4 > * | triangulation | ) |

static

Creates a new set of normal hypersurface matching equations for the given triangulation using the coordinate system corresponding to this particular subclass of NormalHypersurfaceVector.

See makeMatchingEquations() for further details.

Parameters

  triangulation | the triangulation upon which these matching equations will be based.

Returns
  a newly allocated set of matching equations.

## makeZeroVector()

static NormalHypersurfaceVector* regina::NormalHypersurfaceVector::makeZeroVector | ( | const Triangulation< 4 > * | triangulation | ) |

static

Returns a new normal hypersurface vector of the appropriate length for the given triangulation and for the coordinate system corresponding to this subclass of NormalHypersurfaceVector.

All elements of the new vector will be initialised to zero.

See makeZeroVector() for further details.

Parameters

  triangulation | the triangulation upon which the underlying coordinate system is based.

Returns
  a new zero vector of the correct class and length.

## operator+=()

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

inline virtual

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 need adjusting.

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

Parameters

  other | the vector to add to this vector.

## operator[]()

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

inline

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.

## prisms()

virtual LargeInteger regina::NormalHypersurfaceVector::prisms | ( | size_t | pentIndex,
|  | int | prismType,
|  | const Triangulation< 4 > * | triang
| ) |  | const

pure virtual

Returns the number of prism pieces of the given type in this normal hypersurface.

See NormalHypersurface::prisms() for further details.

Parameters

  pentIndex | the index in the triangulation of the pentachoron in which the requested prism pieces reside; this should be between 0 and Triangulation<4>::size()-1 inclusive.
  prismType | specifies the edge of the given pentachoron that this prism separates from the opposite triangle; this should be between 0 and 9 inclusive.
  triang | the triangulation in which this normal hypersurface lives.

Returns
  the number of prism pieces of the given type.

Implemented in regina::HSVectorStandard.

## scaleDown()

void regina::NormalHypersurfaceVector::scaleDown | ( |  | ) |

inline virtual

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.

## setElement()

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

inline virtual

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 e between 0 and size()-1 inclusive.
  value | the new value to assign to the given coordinate.

## size()

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

inline

Returns the number of coordinates in the underlying vector.

Returns
  the number of coordinates.

## tetrahedra()

virtual LargeInteger regina::NormalHypersurfaceVector::tetrahedra | ( | size_t | pentIndex,
|  | int | vertex,
|  | const Triangulation< 4 > * | triang
| ) |  | const

pure virtual

Returns the number of tetrahedron pieces of the given type in this normal hypersurface.

See NormalHypersurface::tetrahedra() for further details.

Parameters

  pentIndex | the index in the triangulation of the pentachoron in which the requested tetrahedron pieces reside; this should be between 0 and Triangulation<4>::size()-1 inclusive.
  vertex | the vertex of the given pentachoron around which the requested tetrahedron pieces lie; this should be between 0 and 4 inclusive.
  triang | the triangulation in which this normal hypersurface lives.

Returns
  the number of tetrahedron pieces of the given type.

Implemented in regina::HSVectorStandard.

## Member Data Documentation

## coords_

Ray regina::NormalHypersurfaceVector::coords_

protected

The raw vector of normal coordinates.

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

- hypersurface/normalhypersurface.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).