Regina Calculation Engine
|
A vector of integers used to indirectly store the individual angles in an angle structure. More...
#include <angle/nanglestructure.h>
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... | |
![]() | |
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... | |
![]() | |
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 NLargeInteger & | operator[] (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 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... | |
![]() | |
NLargeInteger * | elements |
The internal array containing all vector elements. More... | |
NLargeInteger * | end |
A pointer just beyond the end of the internal array. More... | |
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.
|
inline |
Creates a new vector all of whose entries are initialised to zero.
length | the number of elements in the new vector. |
|
inline |
Creates a new vector that is a clone of the given vector.
cloneMe | the vector to clone. |