Regina Calculation Engine
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
regina::NDiscType Struct Reference

Identifies a single normal or almost normal disc type within a triangulation. More...

#include <surfaces/ndisctype.h>

Public Member Functions

 NDiscType ()
 Creates a new disc type initialised to NONE. More...
 
 NDiscType (unsigned long newTetIndex, int newType)
 Creates a new disc type initialised with the given values. More...
 
 NDiscType (const NDiscType &cloneMe)
 Creates a copy of the given disc type. More...
 
NDiscTypeoperator= (const NDiscType &cloneMe)
 Sets this to a copy of the given disc type. More...
 
bool operator== (const NDiscType &compare) const
 Determines if this and the given disc type are identical. More...
 
bool operator!= (const NDiscType &compare) const
 Determines if this and the given disc type are different. More...
 
bool operator< (const NDiscType &compare) const
 Provides an ordering of disc types. More...
 

Public Attributes

unsigned long tetIndex
 The index within the triangulation of the tetrahedron containing this disc type. More...
 
int type
 Identifies the disc type within the specified tetrahedron. More...
 

Static Public Attributes

static const NDiscType NONE
 Represents a "null" disc type. More...
 

Detailed Description

Identifies a single normal or almost normal disc type within a triangulation.

A disc type is identified by a tetrahedron index (the data member tetIndex), and a disc type within that tetrahedron (the data member type). The latter could mean any number of things according to the application at hand. For instance, if we are tracking quad types then type might be an integer between 0 and 2 inclusive, or if we are tracking all normal discs in standard coordinates then type might be an integer between 0 and 6 inclusive. Ultimately, the specific meaning of type is left to the user.

It is however assumed that type will always be non-negative for "meaningful" disc types; this is to ensure that the constant NONE does not clash with any meaningful values.

Note that this class tracks disc types, not discs themselves. To track individual normal discs, see the NDiscSpec class instead.

Constructor & Destructor Documentation

regina::NDiscType::NDiscType ( )
inline

Creates a new disc type initialised to NONE.

regina::NDiscType::NDiscType ( unsigned long  newTetIndex,
int  newType 
)
inline

Creates a new disc type initialised with the given values.

Parameters
newTetIndexthe index within the triangulation of the tetrahedron containing this disc type.
newTypethe specific disc type within the given tetrahedron; see the class notes for the meaning of this field.
regina::NDiscType::NDiscType ( const NDiscType cloneMe)
inline

Creates a copy of the given disc type.

Parameters
cloneMethe disc type to clone.

Member Function Documentation

bool regina::NDiscType::operator!= ( const NDiscType compare) const
inline

Determines if this and the given disc type are different.

This is the negation of the equality test; see operator == for further details.

Returns
true if this and the given disc type are different, or false if they are identical.
bool regina::NDiscType::operator< ( const NDiscType compare) const
inline

Provides an ordering of disc types.

Types are ordered first by tetrahedron and then by type. NONE is considered less than all "meaningful" disc types.

Returns
true if this disc type appears before the given disc type in the ordering, or false if not.
NDiscType & regina::NDiscType::operator= ( const NDiscType cloneMe)
inline

Sets this to a copy of the given disc type.

Parameters
cloneMethe disc type to clone.
Returns
a reference to this disc type.
bool regina::NDiscType::operator== ( const NDiscType compare) const
inline

Determines if this and the given disc type are identical.

Note that NONE is considered identical to NONE, and that NONE will not be equal to any "meaningful" disc type (specifically, a disc type for which type is non-negative).

Returns
true if this and the given disc type are identical, or false if they are different.

Member Data Documentation

const NDiscType regina::NDiscType::NONE
static

Represents a "null" disc type.

Here the type member is negative, to distinguish it from "meaningful" disc types in which type is always zero or positive.

unsigned long regina::NDiscType::tetIndex

The index within the triangulation of the tetrahedron containing this disc type.

This must be between 0 and NTriangulation::getNumberOfTetrahedra()-1 inclusive.

int regina::NDiscType::type

Identifies the disc type within the specified tetrahedron.

The precise meaning of this member is left up to the user, though it must be non-negative for "meaningful" disc types. See the NDiscType class notes for details.


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

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