regina::NFacePair Class Reference
Triangulations

Represents a pair of tetrahedron face numbers. More...

`#include <triangulation/nfacepair.h>`

## Public Member Functions

| NFacePair ()
| Creates a new face pair (0,1). More...
| NFacePair (int newFirst, int newSecond)
| Creates a new face pair from the two given face numbers. More...
| NFacePair (const NFacePair &cloneMe)
| Creates a new face pair that is a clone of the given pair. More...
unsigned | lower () const
| Returns the smaller of the two face numbers in this pair. More...
unsigned | upper () const
| Returns the larger of the two face numbers in this pair. More...
bool | isBeforeStart () const
| Determines if this face pair represents a before-the-start value. More...
bool | isPastEnd () const
| Determines if this face pair represents a past-the-end value. More...
NFacePair | complement () const
| Returns the complement of this face pair. More...
NFacePair & | operator= (const NFacePair &cloneMe)
| Sets this face pair to be a copy of the given pair. More...
bool | operator== (const NFacePair &other) const
| Determines if this and the given face pair are equal. More...
bool | operator< (const NFacePair &other) const
| Determines if this is less than the given face pair. More...
bool | operator> (const NFacePair &other) const
| Determines if this is greater than the given face pair. More...
bool | operator<= (const NFacePair &other) const
| Determines if this is less than or equal to the given face pair. More...
bool | operator>= (const NFacePair &other) const
| Determines if this is greater than or equal to the given face pair. More...
void | operator++ (int)
| Increments this face pair. More...
void | operator-- (int)
| Decrements this face pair. More...

## Detailed Description

Represents a pair of tetrahedron face numbers.

Note that we are not storing triangle numbers in a triangulation skeleton, but merely face numbers 0, 1, 2 and 3 in a single tetrahedron. Thus there are only six possible face pairs; this class merely makes working with such pairs more convenient.

As well as providing the six possible face pairs, there is also a before-the-start and a past-the-end value; this (combined with the increment operator) allows for iteration through face pairs.

When iterating through face pairs, the ordering will be the lexicographical ordering (0,1), (0,2), (0,3), (1,2), (1,3), (2,3).

The before-the-start and past-the-end values are internally represented as (0,0) and (3,3) respectively.

## Constructor & Destructor Documentation

regina::NFacePair::NFacePair | ( |  | ) |

inline

Creates a new face pair (0,1).

regina::NFacePair::NFacePair | ( | int | newFirst,
|  | int | newSecond
| ) |  |

Creates a new face pair from the two given face numbers.

The two given numbers need not be in any particular order.

Precondition
  The two given face numbers must be distinct integers between 0 and 3 inclusive.

Parameters

  newFirst | the first face number in the new pair.
  newSecond | the second face number in the new pair.

regina::NFacePair::NFacePair | ( | const NFacePair & | cloneMe | ) |

inline

Creates a new face pair that is a clone of the given pair.

Parameters

  cloneMe | the face pair to clone.

## Member Function Documentation

NFacePair regina::NFacePair::complement | ( |  | ) | const

Returns the complement of this face pair.

The complement is the pair containing the two faces not included in this face pair.

Precondition
  This face pair is neither before-the-start nor past-the-end.

Returns
  the complement of this face pair.

bool regina::NFacePair::isBeforeStart | ( |  | ) | const

inline

Determines if this face pair represents a before-the-start value.

Returns
  `true` if and only if this face pair is before-the-start.

bool regina::NFacePair::isPastEnd | ( |  | ) | const

inline

Determines if this face pair represents a past-the-end value.

Returns
  `true` if and only if this face pair is past-the-end.

unsigned regina::NFacePair::lower | ( |  | ) | const

inline

Returns the smaller of the two face numbers in this pair.

Precondition
  This face pair is neither before-the-start or past-the-end.

Returns
  the lower face number.

void regina::NFacePair::operator++ | ( | int |  | ) |

Increments this face pair.

It will be set to the following face pair in the lexicographical ordering, or to a past-the-end value if there are no more face pairs.

Python:
  This routine is called inc(), since Python does not support the increment operator.

void regina::NFacePair::operator-- | ( | int |  | ) |

Decrements this face pair.

It will be set to the previous face pair in the lexicographical ordering, or to a before-the-start value if there are no previous face pairs.

Python:
  This routine is called dec(), since Python does not support the decrement operator.

bool regina::NFacePair::operator< | ( | const NFacePair & | other | ) | const

inline

Determines if this is less than the given face pair.

Parameters

  other | the pair to compare with this.

Returns
  `true` if and only if this is less than other.

bool regina::NFacePair::operator<= | ( | const NFacePair & | other | ) | const

inline

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

Parameters

  other | the pair to compare with this.

Returns
  `true` if and only if this is less than or equal to other.

NFacePair & regina::NFacePair::operator= | ( | const NFacePair & | cloneMe | ) |

inline

Sets this face pair to be a copy of the given pair.

Parameters

  cloneMe | the face pair to clone.

Returns
  a reference to this face pair.

bool regina::NFacePair::operator== | ( | const NFacePair & | other | ) | const

inline

Determines if this and the given face pair are equal.

Parameters

  other | the pair to compare with this.

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

bool regina::NFacePair::operator> | ( | const NFacePair & | other | ) | const

inline

Determines if this is greater than the given face pair.

Parameters

  other | the pair to compare with this.

Returns
  `true` if and only if this is greater than other.

bool regina::NFacePair::operator>= | ( | const NFacePair & | other | ) | const

inline

Determines if this is greater than or equal to the given face pair.

Parameters

  other | the pair to compare with this.

Returns
  `true` if and only if this is greater than or equal to other.

unsigned regina::NFacePair::upper | ( |  | ) | const

inline

Returns the larger of the two face numbers in this pair.

Precondition
  This face pair is neither before-the-start or past-the-end.

Returns
  the upper face number.

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

- triangulation/nfacepair.h

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).