Regina 7.3 Calculation Engine
Public Member Functions | Public Attributes | Friends | List of all members
regina::DiscSpec Struct Reference

Specifies a single normal disc in a normal surface. More...

#include <surface/disc.h>

Public Member Functions

 DiscSpec ()=default
 Creates a new uninitialised disc specifier. More...
 
 DiscSpec (size_t newTetIndex, int newType, unsigned long newNumber)
 Creates a new disc specifier containing the given values. More...
 
 DiscSpec (const DiscSpec &cloneMe)=default
 Creates a new disc specifier that is a clone of the given specifier. More...
 
DiscSpecoperator= (const DiscSpec &cloneMe)=default
 Copies the values from the given disc specifier into this specifier. More...
 
bool operator== (const DiscSpec &other) const
 Determines if this and the given disc specifier contain identical information. More...
 
bool operator!= (const DiscSpec &other) const
 Determines if this and the given disc specifier contain different information. More...
 

Public Attributes

size_t tetIndex
 The index in the triangulation of the tetrahedron containing the disc. More...
 
int type
 The disc type; this is between 0 and 9 inclusive, as described in the DiscSpec class notes. More...
 
unsigned long number
 Specifies which disc of the particular type in the particular tetrahedron is being referred to; discs are numbered as described in the DiscSpec class notes. More...
 

Friends

std::ostream & operator<< (std::ostream &out, const DiscSpec &spec)
 Writes the given disc specifier to the given output stream. More...
 

Detailed Description

Specifies a single normal disc in a normal surface.

There are 10 disc types. Types 0-3 represent triangles 0-3, types 4-6 represent quads 0-2 and types 7-9 represent octagons 0-2.

Discs of a specific type are assigned numbers from 0 upwards. Triangular discs are numbered outwards from the vertex they surround. Quad discs and octagonal discs are numbered outwards away from vertex 0 of the tetrahedron.

Note that, unlike DiscType in which the meaning of DiscType::type is flexible, the meaning of DiscSpec::type is fixed as described above.

These objects are small enough to pass by value and swap with std::swap(), with no need for any specialised move operations or swap functions.

Warning
This class converts the indices of normal discs of a given type from LargeInteger 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.

Constructor & Destructor Documentation

◆ DiscSpec() [1/3]

regina::DiscSpec::DiscSpec ( )
default

Creates a new uninitialised disc specifier.

◆ DiscSpec() [2/3]

regina::DiscSpec::DiscSpec ( size_t  newTetIndex,
int  newType,
unsigned long  newNumber 
)
inline

Creates a new disc specifier containing the given values.

Parameters
newTetIndexthe index in the triangulation of the tetrahedron containing the disc.
newTypethe disc type; this is between 0 and 9 inclusive, as described in the DiscSpec class notes.
newNumberspecifies which disc of the particular type in the particular tetrahedron is being referred to; discs are numbered as described in the DiscSpec class notes.

◆ DiscSpec() [3/3]

regina::DiscSpec::DiscSpec ( const DiscSpec cloneMe)
default

Creates a new disc specifier that is a clone of the given specifier.

Parameters
cloneMethe disc specifier to clone.

Member Function Documentation

◆ operator!=()

bool regina::DiscSpec::operator!= ( const DiscSpec other) const
inline

Determines if this and the given disc specifier contain different information.

Parameters
otherthe disc specifier to compare with this.
Returns
true if and only if this and the given disc specifier contain different information.

◆ operator=()

DiscSpec & regina::DiscSpec::operator= ( const DiscSpec cloneMe)
default

Copies the values from the given disc specifier into this specifier.

Parameters
cloneMethe disc specifier whose values should be copied.
Returns
a reference to this disc specifier.

◆ operator==()

bool regina::DiscSpec::operator== ( const DiscSpec other) const
inline

Determines if this and the given disc specifier contain identical information.

Parameters
otherthe disc specifier to compare with this.
Returns
true if and only if this and the given disc specifier contain identical information.

Friends And Related Function Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream &  out,
const DiscSpec spec 
)
friend

Writes the given disc specifier to the given output stream.

The disc specifier will be written as a triple (tetIndex, type, number).

Parameters
outthe output stream to which to write.
specthe disc specifier to write.
Returns
a reference to out.

Member Data Documentation

◆ number

unsigned long regina::DiscSpec::number

Specifies which disc of the particular type in the particular tetrahedron is being referred to; discs are numbered as described in the DiscSpec class notes.

◆ tetIndex

size_t regina::DiscSpec::tetIndex

The index in the triangulation of the tetrahedron containing the disc.

◆ type

int regina::DiscSpec::type

The disc type; this is between 0 and 9 inclusive, as described in the DiscSpec class notes.


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

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