regina::AngleStructureVector Class Reference
Angle Structures

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

`#include <angle/anglestructure.h>`

Inheritance diagram for regina::AngleStructureVector:

## Public Member Functions

| AngleStructureVector (size_t length)
| Creates a new vector all of whose entries are initialised to zero. More...
| AngleStructureVector (const Vector< LargeInteger > &cloneMe)
| Creates a new vector that is a clone of the given vector. 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...
size_t | size () const
| Returns the number of elements in the vector. More...
const LargeInteger & | operator[] (size_t index) const
| Returns the element at the given index in the vector. More...
void | setElement (size_t index, const LargeInteger &value)
| Sets the element at the given index in the vector to the given value. More...
bool | operator== (const Vector< LargeInteger > &compare) const
| Determines if this vector is equal to the given vector. More...
void | operator+= (const Vector< LargeInteger > &other)
| Adds the given vector to this vector. More...
void | operator-= (const Vector< LargeInteger > &other)
| Subtracts the given vector from this vector. More...
void | operator*= (const LargeInteger &factor)
| Multiplies this vector by the given scalar. More...
LargeInteger | operator* (const Vector< LargeInteger > &other) const
| Calculates the dot product of this vector and the given vector. More...
LargeInteger | norm () const
| Returns the norm of this vector. More...
LargeInteger | elementSum () const
| Returns the sum of all elements of this vector. More...
void | addCopies (const Vector< LargeInteger > &other, const LargeInteger &multiple)
| Adds the given multiple of the given vector to this vector. More...
void | subtractCopies (const Vector< LargeInteger > &other, const LargeInteger &multiple)
| Subtracts the given multiple of the given vector to this vector. More...

## Static Public Member Functions

static MatrixInt * | makeAngleEquations (const Triangulation< 3 > *tri)
| Creates a new set of angle structure equations for the given triangulation. More...

## Static Public Attributes

static LargeInteger | zero
| Zero in the underlying number system. More...
static LargeInteger | one
| One in the underlying number system. More...
static LargeInteger | minusOne
| Negative one in the underlying number system. More...

## Protected Attributes

LargeInteger * | elements
| The internal array containing all vector elements. More...
LargeInteger * | end
| 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 DoubleDescription 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 corresponding to edges 0, 1 and 2 of the tetrahedron (and also their opposite edges 5, 4 and 3 respectively). The final element of the vector is the scaling member as described above.

Python:\n Not present.

## Member Function Documentation

## addCopies()

void regina::Vector< LargeInteger >::addCopies | ( | const Vector< LargeInteger > & | other,
|  | const LargeInteger & | multiple
| ) |  |

inline inherited

Adds the given multiple of the given vector to this vector.

This behaves correctly in the case where other is `this`.

Precondition
  This and the given vector have the same size.

Parameters

  other | the vector a multiple of which will be added to this vector.
  multiple | the multiple of other to be added to this vector.

## elementSum()

LargeInteger regina::Vector< LargeInteger >::elementSum | ( |  | ) | const

inline inherited

Returns the sum of all elements of this vector.

Returns
  the sum of the elements of this vector.

## norm()

LargeInteger regina::Vector< LargeInteger >::norm | ( |  | ) | const

inline inherited

Returns the norm of this vector.

This is the dot product of the vector with itself.

Returns
  the norm of this vector.

## operator*()

LargeInteger regina::Vector< LargeInteger >::operator* | ( | const Vector< LargeInteger > & | other | ) | const

inline inherited

Calculates the dot product of this vector and the given vector.

Precondition
  This and the given vector have the same size.

Parameters

  other | the vector with which this will be multiplied.

Returns
  the dot product of this and the given vector.

## operator*=()

void regina::Vector< LargeInteger >::operator*= | ( | const LargeInteger & | factor | ) |

inline inherited

Multiplies this vector by the given scalar.

Parameters

  factor | the scalar with which this will be multiplied.

## operator+=()

void regina::Vector< LargeInteger >::operator+= | ( | const Vector< LargeInteger > & | other | ) |

inline inherited

Adds the given vector to this vector.

This behaves correctly in the case where other is `this`.

Precondition
  This and the given vector have the same size.

Parameters

  other | the vector to add to this vector.

## operator-=()

void regina::Vector< LargeInteger >::operator-= | ( | const Vector< LargeInteger > & | other | ) |

inline inherited

Subtracts the given vector from this vector.

This behaves correctly in the case where other is `this`.

Precondition
  This and the given vector have the same size.

Parameters

  other | the vector to subtract from this vector.

## operator==()

bool regina::Vector< LargeInteger >::operator== | ( | const Vector< LargeInteger > & | compare | ) | const

inline inherited

Determines if this vector is equal to the given vector.

Precondition
  This and the given vector have the same size.

Parameters

  compare | the vector with which this will be compared.

Returns
  `true` if and only if the this and the given vector are equal.

## operator[]()

const LargeInteger & regina::Vector< LargeInteger >::operator[] | ( | size_t | index | ) | const

inline inherited

Returns the element at the given index in the vector.

A constant reference to the element is returned; the element may not be altered.

Precondition
  `index` is between 0 and size()-1 inclusive.

Parameters

  index | the vector index to examine.

Returns
  the vector element at the given index.

## setElement()

void regina::Vector< LargeInteger >::setElement | ( | size_t | index,
|  | const LargeInteger & | value
| ) |  |

inline inherited

Sets the element at the given index in the vector to the given value.

Precondition
  `index` is between 0 and size()-1 inclusive.

Parameters

  index | the vector index to examine.
  value | the new value to assign to the element.

## size()

size_t regina::Vector< LargeInteger >::size | ( |  | ) | const

inline inherited

Returns the number of elements in the vector.

Returns
  the vector size.

## subtractCopies()

void regina::Vector< LargeInteger >::subtractCopies | ( | const Vector< LargeInteger > & | other,
|  | const LargeInteger & | multiple
| ) |  |

inline inherited

Subtracts the given multiple of the given vector to this vector.

This behaves correctly in the case where other is `this`.

Precondition
  This and the given vector have the same size.

Parameters

  other | the vector a multiple of which will be subtracted from this vector.
  multiple | the multiple of other to be subtracted from this vector.

## Member Data Documentation

## elements

LargeInteger * regina::Vector< LargeInteger >::elements

protected inherited

The internal array containing all vector elements.

## end

LargeInteger * regina::Vector< LargeInteger >::end

protected inherited

A pointer just beyond the end of the internal array.

The size of the vector can be computed as (end - elements).

## minusOne

LargeInteger regina::Vector< LargeInteger >::minusOne

static inherited

Negative one in the underlying number system.

This would be `const` if it weren't for the fact that some compilers don't like this. It should never be modified!

## one

LargeInteger regina::Vector< LargeInteger >::one

static inherited

One in the underlying number system.

This would be `const` if it weren't for the fact that some compilers don't like this. It should never be modified!

## zero

LargeInteger regina::Vector< LargeInteger >::zero

static inherited

Zero in the underlying number system.

This would be `const` if it weren't for the fact that some compilers don't like this. It should never be modified!

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

- angle/anglestructure.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).