Regina Calculation Engine
Public Member Functions | List of all members
regina::NAngleStructureVector Class Reference

A vector of integers used to indirectly store the individual angles in an angle structure. More...

#include <angle/nanglestructure.h>

Inheritance diagram for regina::NAngleStructureVector:
regina::NRay regina::NVector< NLargeInteger >

Public Member Functions

 NAngleStructureVector (size_t length)
 Creates a new vector all of whose entries are initialised to zero. More...
 
 NAngleStructureVector (const NVector< NLargeInteger > &cloneMe)
 Creates a new vector that is a clone of the given vector. More...
 
- Public Member Functions inherited from regina::NRay
 NRay (size_t length)
 Creates a new ray all of whose coordinates are initialised to zero. More...
 
 NRay (const NVector< NLargeInteger > &cloneMe)
 Creates a new ray that is a clone of the given ray. More...
 
void scaleDown ()
 Scales this vector down by the greatest common divisor of all its elements. More...
 
void negate ()
 Negates every element of this vector. More...
 
- Public Member Functions inherited from regina::NVector< NLargeInteger >
 NVector (size_t newVectorSize)
 Creates a new vector. More...
 
 NVector (size_t newVectorSize, const NLargeInteger &initValue)
 Creates a new vector and initialises every element to the given value. More...
 
 NVector (const NVector< NLargeInteger > &cloneMe)
 Creates a new vector that is a clone of the given vector. More...
 
 ~NVector ()
 Destroys this vector. More...
 
size_t size () const
 Returns the number of elements in the vector. More...
 
const NLargeIntegeroperator[] (size_t index) const
 Returns the element at the given index in the vector. More...
 
void setElement (size_t index, const NLargeInteger &value)
 Sets the element at the given index in the vector to the given value. More...
 
bool operator== (const NVector< NLargeInteger > &compare) const
 Determines if this vector is equal to the given vector. More...
 
NVector< NLargeInteger > & operator= (const NVector< NLargeInteger > &cloneMe)
 Sets this vector equal to the given vector. More...
 
void operator+= (const NVector< NLargeInteger > &other)
 Adds the given vector to this vector. More...
 
void operator-= (const NVector< NLargeInteger > &other)
 Subtracts the given vector from this vector. More...
 
void operator*= (const NLargeInteger &factor)
 Multiplies this vector by the given scalar. More...
 
NLargeInteger operator* (const NVector< NLargeInteger > &other) const
 Calculates the dot product of this vector and the given vector. More...
 
void negate ()
 Negates every element of this vector. More...
 
NLargeInteger norm () const
 Returns the norm of this vector. More...
 
NLargeInteger elementSum () const
 Returns the sum of all elements of this vector. More...
 
void addCopies (const NVector< NLargeInteger > &other, const NLargeInteger &multiple)
 Adds the given multiple of the given vector to this vector. More...
 
void subtractCopies (const NVector< NLargeInteger > &other, const NLargeInteger &multiple)
 Subtracts the given multiple of the given vector to this vector. More...
 

Additional Inherited Members

- Static Public Attributes inherited from regina::NVector< NLargeInteger >
static NLargeInteger zero
 Zero in the underlying number system. More...
 
static NLargeInteger one
 One in the underlying number system. More...
 
static NLargeInteger minusOne
 Negative one in the underlying number system. More...
 
- Protected Attributes inherited from regina::NVector< NLargeInteger >
NLargeIntegerelements
 The internal array containing all vector elements. More...
 
NLargeIntegerend
 A pointer just beyond the end of the internal array. More...
 

Detailed Description

A vector of integers used to indirectly store the individual angles in an angle structure.

This vector will contain one member per angle plus a final scaling member; to obtain the actual angle in the angle structure one should divide the corresonding angle member by the scaling member and then multiply by pi.

The reason for using this obfuscated representation is so we can use the NDoubleDescription vertex enumeration routines to calculate vertex angle structures.

If there are t tetrahedra in the underlying triangulation, there will be precisely 3t+1 elements in this vector. The first three elements will be the angle members for the first tetrahedron, the next three for the second tetrahedron and so on. For each tetraheron, the three individual elements are the angle members for vertex splittings 0, 1 and 2 (see NAngleStructure::getAngle()). The final element of the vector is the scaling member as described above.

Test:
Included in the test suite.
Python:
Not present.

Constructor & Destructor Documentation

regina::NAngleStructureVector::NAngleStructureVector ( 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.
regina::NAngleStructureVector::NAngleStructureVector ( const NVector< NLargeInteger > &  cloneMe)
inline

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

Parameters
cloneMethe vector to clone.

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

Copyright © 1999-2013, 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@debian.org).