Regina Calculation Engine
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
regina::HSVectorStandard Class Referenceabstract


A normal hypersurface vector using standard tetrahedron-prism coordinates. More...

#include <hypersurface/hsvectorstandard.h>

Inheritance diagram for regina::HSVectorStandard:
regina::NormalHypersurfaceVector

Public Member Functions

 HSVectorStandard (size_t length)
 Creates a new vector all of whose entries are initialised to zero. More...
 
 HSVectorStandard (const Vector< LargeInteger > &cloneMe)
 Creates a new vector that is a clone of the given vector. More...
 
virtual LargeInteger tetrahedra (size_t pentIndex, int vertex, const Triangulation< 4 > *triang) const override
 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 override
 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 override
 Returns the number of times this normal hypersurface crosses the given edge. More...
 
const Raycoords () const
 Gives read-only access to the underlying vector of coordinates. More...
 
virtual NormalHypersurfaceVectorclone () 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 LargeIntegeroperator[] (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...
 

Static Public Member Functions

static NormalHypersurfaceVectormakeZeroVector (const Triangulation< 4 > *triangulation)
 
static MatrixIntmakeMatchingEquations (const Triangulation< 4 > *triangulation)
 
static EnumConstraintsmakeEmbeddedConstraints (const Triangulation< 4 > *triangulation)
 

Protected Attributes

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

Detailed Description


A normal hypersurface vector using standard tetrahedron-prism coordinates.

If there are p pentachora in the underlying triangulation, there must be precisely 15p coordinates. The first 15 coordinates will be for the first pentachoron, the next 15 for the second pentachoron and so on. For each pentachoron, the first five represent the number of tetrahedron pieces about vertex 0,...,4, and the next ten represent the number of prism pieces of type 0,...,9 (see NormalHypersurface::prisms() for details).

Python
Not present.

Constructor & Destructor Documentation

◆ HSVectorStandard() [1/2]

regina::HSVectorStandard::HSVectorStandard ( size_t  length)
inline

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

Parameters
lengththe number of elements in the new vector.

◆ HSVectorStandard() [2/2]

regina::HSVectorStandard::HSVectorStandard ( const Vector< LargeInteger > &  cloneMe)
inline

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

Parameters
cloneMethe vector to clone.

Member Function Documentation

◆ clone()

virtual NormalHypersurfaceVector* regina::NormalHypersurfaceVector::clone ( ) const
pure virtualinherited

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
inlineinherited

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

Returns
the vector of coordinates.

◆ edgeWeight()

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

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

See NormalHypersurface::edgeWeight() for further details.

Parameters
edgeIndexthe index in the triangulation of the edge in which we are interested; this should be between 0 and Triangulation<4>::countEdges()-1 inclusive.
triangthe triangulation in which this normal hypersurface lives.
Returns
the number of times this normal hypersurface crosses the given edge.

Implements regina::NormalHypersurfaceVector.

◆ isCompact()

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

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
triangthe 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
virtualinherited

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
triangthe 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
virtualinherited

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
triangthe 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
virtualinherited

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
triangthe triangulation in which this normal hypersurface lives.
Returns
true if and only if the normal hypersurface represented is vertex linking.

◆ operator+=()

void regina::NormalHypersurfaceVector::operator+= ( const NormalHypersurfaceVector other)
inlinevirtualinherited

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
otherthe vector to add to this vector.

◆ operator[]()

const LargeInteger & regina::NormalHypersurfaceVector::operator[] ( size_t  index) const
inlineinherited

Returns the given coordinate from the underlying vector.

Parameters
indexthe index of the coordinate to retrieve; this must be between 0 and size()-1 inclusive.
Returns
the coordinate at the given index.

◆ prisms()

LargeInteger regina::HSVectorStandard::prisms ( size_t  pentIndex,
int  prismType,
const Triangulation< 4 > *  triang 
) const
inlineoverridevirtual

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

See NormalHypersurface::prisms() for further details.

Parameters
pentIndexthe 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.
prismTypespecifies the edge of the given pentachoron that this prism separates from the opposite triangle; this should be between 0 and 9 inclusive.
triangthe triangulation in which this normal hypersurface lives.
Returns
the number of prism pieces of the given type.

Implements regina::NormalHypersurfaceVector.

◆ scaleDown()

void regina::NormalHypersurfaceVector::scaleDown ( )
inlinevirtualinherited

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 
)
inlinevirtualinherited

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
indexthe index of the coordinate to set; this must e between 0 and size()-1 inclusive.
valuethe new value to assign to the given coordinate.

◆ size()

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

Returns the number of coordinates in the underlying vector.

Returns
the number of coordinates.

◆ tetrahedra()

LargeInteger regina::HSVectorStandard::tetrahedra ( size_t  pentIndex,
int  vertex,
const Triangulation< 4 > *  triang 
) const
inlineoverridevirtual

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

See NormalHypersurface::tetrahedra() for further details.

Parameters
pentIndexthe 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.
vertexthe vertex of the given pentachoron around which the requested tetrahedron pieces lie; this should be between 0 and 4 inclusive.
triangthe triangulation in which this normal hypersurface lives.
Returns
the number of tetrahedron pieces of the given type.

Implements regina::NormalHypersurfaceVector.

Member Data Documentation

◆ coords_

Ray regina::NormalHypersurfaceVector::coords_
protectedinherited

The raw vector of normal coordinates.


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

Copyright © 1999-2021, 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).