Regina Calculation Engine
Public Types | Public Member Functions | Protected Attributes
regina::NDiscSetTetData< T > Class Template Reference

Stores data of type T for every normal disc inside a single tetrahedron. More...

#include <surfaces/ndisc.h>

Inheritance diagram for regina::NDiscSetTetData< T >:
regina::NDiscSetTet

List of all members.

Public Types

typedef T * DataPtr
 A type that is a pointer to the data stored with each disc.

Public Member Functions

 NDiscSetTetData (const NNormalSurface &surface, unsigned long tetIndex)
 Creates a new disc set corresponding to the discs of the given normal surface that lie within the given tetrahedron.
 NDiscSetTetData (const NNormalSurface &surface, unsigned long tetIndex, const T &initValue)
 Creates a new disc set corresponding to the discs of the given normal surface that lie within the given tetrahedron.
 NDiscSetTetData (unsigned long tri0, unsigned long tri1, unsigned long tri2, unsigned long tri3, unsigned long quad0, unsigned long quad1, unsigned long quad2, unsigned long oct0=0, unsigned long oct1=0, unsigned long oct2=0)
 Creates a new disc set where the number of discs of each type is explicitly given.
virtual ~NDiscSetTetData ()
 Destroys this disc set and deallocates all data arrays.
T & data (int discType, unsigned long discNumber)
 Retrieves a reference to the data corresponding to the given normal disc.

Protected Attributes

DataPtr internalData [10]
 Stores the data corresponding to each normal disc.

Detailed Description

template<class T>
class regina::NDiscSetTetData< T >

Stores data of type T for every normal disc inside a single tetrahedron.

Warning:
This class converts the number of normal discs of a given type from NLargeInteger to unsigned long. See the precondition below.
Precondition:
The number of normal discs of a particular type in a particular tetrahedron can be represented by a long integer.
This class should only be used with embedded normal surfaces.
Type T has a default constructor and an assignment operator. That is, if a and b are of type T, then a can be declared with no parameters and can then receive the value of b using a=b.
Python:
Not present.

Member Typedef Documentation

template<class T >
typedef T* regina::NDiscSetTetData< T >::DataPtr

A type that is a pointer to the data stored with each disc.


Constructor & Destructor Documentation

template<class T >
regina::NDiscSetTetData< T >::NDiscSetTetData ( const NNormalSurface surface,
unsigned long  tetIndex 
) [inline]

Creates a new disc set corresponding to the discs of the given normal surface that lie within the given tetrahedron.

The data for each disc will remain uninitialised.

Parameters:
surfacethe normal surface whose discs we shall use.
tetIndexthe index in the triangulation of the tetrahedron that our discs must lie in; this must be between 0 and tri.getNumberOfTetrahedra()-1 inclusive, where tri is the triangulation containing the given normal surface.
template<class T >
regina::NDiscSetTetData< T >::NDiscSetTetData ( const NNormalSurface surface,
unsigned long  tetIndex,
const T &  initValue 
) [inline]

Creates a new disc set corresponding to the discs of the given normal surface that lie within the given tetrahedron.

The data for each disc will be initialised to the given value.

Parameters:
surfacethe normal surface whose discs we shall use.
tetIndexthe index in the triangulation of the tetrahedron that our discs must lie in; this must be between 0 and tri.getNumberOfTetrahedra()-1 inclusive, where tri is the triangulation containing the given normal surface.
initValuethe value with which to initialise the data corresponding to each disc.
template<class T >
regina::NDiscSetTetData< T >::NDiscSetTetData ( unsigned long  tri0,
unsigned long  tri1,
unsigned long  tri2,
unsigned long  tri3,
unsigned long  quad0,
unsigned long  quad1,
unsigned long  quad2,
unsigned long  oct0 = 0,
unsigned long  oct1 = 0,
unsigned long  oct2 = 0 
) [inline]

Creates a new disc set where the number of discs of each type is explicitly given.

The data for each disc will remain uninitialised.

Parameters:
tri0the number of triangular discs surrounding vertex 0.
tri1the number of triangular discs surrounding vertex 1.
tri2the number of triangular discs surrounding vertex 2.
tri3the number of triangular discs surrounding vertex 3.
quad0the number of quadrilateral discs of type 0.
quad1the number of quadrilateral discs of type 1.
quad2the number of quadrilateral discs of type 2.
oct0the number of octahedral discs of type 0.
oct1the number of octahedral discs of type 1.
oct2the number of octahedral discs of type 2.
template<class T >
virtual regina::NDiscSetTetData< T >::~NDiscSetTetData ( ) [inline, virtual]

Destroys this disc set and deallocates all data arrays.

Note that no assumption is made about type T, so if data elements are pointers to dynamically allocated objects, these will not be destroyed.


Member Function Documentation

template<class T >
T& regina::NDiscSetTetData< T >::data ( int  discType,
unsigned long  discNumber 
) [inline]

Retrieves a reference to the data corresponding to the given normal disc.

Parameters:
discTypethe disc type of the given normal disc; this should be between 0 and 9 inclusive, as described in the NDiscSpec class notes.
discNumberindicates which normal disc of the given disc type is referred to; this should be between 0 and nDiscs(discType)-1 inclusive.
Returns:
a reference to the data corresponding to the given normal disc.

Member Data Documentation

template<class T >
DataPtr regina::NDiscSetTetData< T >::internalData[10] [protected]

Stores the data corresponding to each normal disc.


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

Copyright © 1999-2011, The Regina development team
This software is released under the GNU General Public License.
For further information, or to submit a bug or other problem, please contact Ben Burton (bab@debian.org).