Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

regina::NTetFace Struct Reference
[Triangulations]

A lightweight class used to refer to a particular face of a particular tetrahedron. More...

#include <ntetface.h>

List of all members.

Public Member Functions

 NTetFace ()
 Creates a new specifier with no initialisation.

 NTetFace (int newTet, int newFace)
 Creates a new specifier referring to the given face of the given tetrahedron.

 NTetFace (const NTetFace &cloneMe)
 Creates a new specifier referring to the same tetrahedron face as the given specifier.

bool isBoundary (unsigned nTetrahedra) const
 Determines if this specifier represents the overall boundary.

bool isBeforeStart () const
 Determines if this specifier represents a before-the-start value.

bool isPastEnd (unsigned nTetrahedra, bool boundaryAlso) const
 Determines if this specifier represents a past-the-end value.

void setFirst ()
 Sets this specifier to the first face of the first tetrahedron.

void setBoundary (unsigned nTetrahedra)
 Sets this specifier to the overall boundary.

void setBeforeStart ()
 Sets this specifier to before-the-start.

void setPastEnd (unsigned nTetrahedra)
 Sets this specifier to past-the-end.

NTetFaceoperator= (const NTetFace &other)
 Sets this specifier to the value of the given specifier.

NTetFace operator++ ()
 Increments this specifier.

NTetFace operator++ (int)
 Increments this specifier.

NTetFace operator-- ()
 Decrements this specifier.

NTetFace operator-- (int)
 Decrements this specifier.

bool operator== (const NTetFace &other) const
 Determines if this and the given specifier are identical.

bool operator< (const NTetFace &other) const
 Determines if this is less than the given specifier.

bool operator<= (const NTetFace &other) const
 Determines if this is less than or equal to the given specifier.


Public Attributes

int tet
 The tetrahedron referred to.

int face
 The face of the tetrahedron referred to.


Detailed Description

A lightweight class used to refer to a particular face of a particular tetrahedron.

Only the tetrahedron index and face number are stored.

Facilities are provided for iterating through tetrahedron faces. With this in mind, it is also possible to represent the overall boundary, a past-the-end value and a before-the-start value.

When iterating through the tetrahedron faces, the faces will be ordered first by tetrahedron index and then by face number. The overall boundary appears after all other tetrahedron faces.

If there are n tetrahedra, the tetrahedra will be numbered from 0 to n-1 inclusive. The boundary will be represented as tetrahedron n, face 0. The past-the-end value will be represented as tetrahedron n, face 1, and the before-the-start value will be represented as tetrahedron -1, face 3.


Constructor & Destructor Documentation

regina::NTetFace::NTetFace  )  [inline]
 

Creates a new specifier with no initialisation.

This specifier must be initialised before it is used.

regina::NTetFace::NTetFace int  newTet,
int  newFace
[inline]
 

Creates a new specifier referring to the given face of the given tetrahedron.

Parameters:
newTet the given tetrahedron; see the class notes for allowable values of this parameter.
newFace the given face; this should be between 0 and 3 inclusive.

regina::NTetFace::NTetFace const NTetFace cloneMe  )  [inline]
 

Creates a new specifier referring to the same tetrahedron face as the given specifier.

Parameters:
cloneMe the specifier to clone.


Member Function Documentation

bool regina::NTetFace::isBeforeStart  )  const [inline]
 

Determines if this specifier represents a before-the-start value.

Returns:
true if and only if this specifier is before-the-start.

bool regina::NTetFace::isBoundary unsigned  nTetrahedra  )  const [inline]
 

Determines if this specifier represents the overall boundary.

Parameters:
nTetrahedra the number of tetrahedra under consideration. Note that the boundary is represented in this specifier as tetrahedron nTetrahedra, face 0.
Returns:
true if and only if this specifier represents the overall boundary.

bool regina::NTetFace::isPastEnd unsigned  nTetrahedra,
bool  boundaryAlso
const [inline]
 

Determines if this specifier represents a past-the-end value.

You can optionally declare the overall boundary to be past-the-end as well as the already predefined past-the-end value.

Parameters:
nTetrahedra the number of tetrahedra under consideration. Note that past-the-end is represented in this specifier as tetrahedron nTetrahedra, face 1.
boundaryAlso true if the overall boundary should be considered past-the-end in addition to the predefined past-the-end value.
Returns:
true if and only if this specifier is past-the-end.

NTetFace regina::NTetFace::operator++ int   )  [inline]
 

Increments this specifier.

It will be changed to point to the next tetrahedron face.

Faces are ordered first by tetrahedron index and then by face number. The overall boundary appears after all other faces.

Precondition:
This specifier is not past-the-end.
Python:
This routine is named inc() since python does not support the increment operator.
Returns:
A copy of this specifier before it was incremented.

NTetFace regina::NTetFace::operator++  )  [inline]
 

Increments this specifier.

It will be changed to point to the next tetrahedron face.

Faces are ordered first by tetrahedron index and then by face number. The overall boundary appears after all other faces.

Precondition:
This specifier is not past-the-end.
Python:
Not present, although the preincrement operator is present in python as the member function inc().
Returns:
A copy of this specifier after it has been incremented.

NTetFace regina::NTetFace::operator-- int   )  [inline]
 

Decrements this specifier.

It will be changed to point to the previous tetrahedron face.

Faces are ordered first by tetrahedron index and then by face number. The overall boundary appears after all other faces.

Precondition:
This specifier is not before-the-start.
Python:
This routine is named dec() since python does not support the decrement operator.
Returns:
A copy of this specifier before it was decremented.

NTetFace regina::NTetFace::operator--  )  [inline]
 

Decrements this specifier.

It will be changed to point to the previous tetrahedron face.

Faces are ordered first by tetrahedron index and then by face number. The overall boundary appears after all other faces.

Precondition:
This specifier is not before-the-start.
Python:
Not present, although the predecrement operator is present in python as the member function dec().
Returns:
A copy of this specifier after it has been decremented.

bool regina::NTetFace::operator< const NTetFace other  )  const [inline]
 

Determines if this is less than the given specifier.

Parameters:
other the specifier to compare with this.
Returns:
true if and only if this is less than the given specifier.

bool regina::NTetFace::operator<= const NTetFace other  )  const [inline]
 

Determines if this is less than or equal to the given specifier.

Parameters:
other the specifier to compare with this.
Returns:
true if and only if this is less than or equal to the given specifier.

NTetFace & regina::NTetFace::operator= const NTetFace other  )  [inline]
 

Sets this specifier to the value of the given specifier.

Parameters:
other the given specifier.
Returns:
a reference to this specifier.

bool regina::NTetFace::operator== const NTetFace other  )  const [inline]
 

Determines if this and the given specifier are identical.

Parameters:
other the specifier to compare with this.
Returns:
true if and only if this and the given specifier are equal.

void regina::NTetFace::setBeforeStart  )  [inline]
 

Sets this specifier to before-the-start.

void regina::NTetFace::setBoundary unsigned  nTetrahedra  )  [inline]
 

Sets this specifier to the overall boundary.

Parameters:
nTetrahedra the number of tetrahedra under consideration. Note that the boundary is represented in this specifier as tetrahedron nTetrahedra, face 0.

void regina::NTetFace::setFirst  )  [inline]
 

Sets this specifier to the first face of the first tetrahedron.

void regina::NTetFace::setPastEnd unsigned  nTetrahedra  )  [inline]
 

Sets this specifier to past-the-end.

Parameters:
nTetrahedra the number of tetrahedra under consideration. Note that past-the-end is represented in this specifier as tetrahedron nTetrahedra, face 1.


Member Data Documentation

int regina::NTetFace::face
 

The face of the tetrahedron referred to.

The face number is between 0 and 3 inclusive.

int regina::NTetFace::tet
 

The tetrahedron referred to.

Tetrahedron numbering begins at 0.


The documentation for this struct was generated from the following file:
Copyright © 1999-2004, Ben Burton
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).