#include <nfacepair.h>
Public Member Functions | |
NFacePair () | |
Creates a new face pair (0,1). | |
NFacePair (int newFirst, int newSecond) | |
Creates a new face pair from the two given face numbers. | |
NFacePair (const NFacePair &cloneMe) | |
Creates a new face pair that is a clone of the given pair. | |
unsigned | lower () const |
Returns the smaller of the two face numbers in this pair. | |
unsigned | upper () const |
Returns the larger of the two face numbers in this pair. | |
bool | isBeforeStart () const |
Determines if this face pair represents a before-the-start value. | |
bool | isPastEnd () const |
Determines if this face pair represents a past-the-end value. | |
NFacePair | complement () const |
Returns the complement of this face pair. | |
NFacePair & | operator= (const NFacePair &cloneMe) |
Sets this face pair to be a copy of the given pair. | |
bool | operator== (const NFacePair &other) const |
Determines if this and the given face pair are equal. | |
bool | operator< (const NFacePair &other) const |
Determines if this is less than the given face pair. | |
bool | operator> (const NFacePair &other) const |
Determines if this is greater than the given face pair. | |
bool | operator<= (const NFacePair &other) const |
Determines if this is less than or equal to the given face pair. | |
bool | operator>= (const NFacePair &other) const |
Determines if this is greater than or equal to the given face pair. | |
void | operator++ (int) |
Increments this face pair. | |
void | operator-- (int) |
Decrements this face pair. |
Note that we are not storing face 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.
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.
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.
cloneMe | the face pair to clone. |
unsigned regina::NFacePair::lower | ( | ) | const [inline] |
Returns the smaller of the two face numbers in this pair.
unsigned regina::NFacePair::upper | ( | ) | const [inline] |
Returns the larger of the two face numbers in this pair.
bool regina::NFacePair::isBeforeStart | ( | ) | const [inline] |
Determines if this face pair represents a before-the-start value.
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.
true
if and only if this face pair is past-the-end. 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.
Sets this face pair to be a copy of the given pair.
cloneMe | the face pair to clone. |
bool regina::NFacePair::operator== | ( | const NFacePair & | other | ) | const [inline] |
Determines if this and the given face pair are equal.
other | the pair to compare with this. |
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 less than the given face pair.
other | the pair to compare with this. |
true
if and only if this is less than other. bool regina::NFacePair::operator> | ( | const NFacePair & | other | ) | const [inline] |
Determines if this is greater than the given face pair.
other | the pair to compare with this. |
true
if and only if this is greater than other. bool regina::NFacePair::operator<= | ( | const NFacePair & | other | ) | const [inline] |
Determines if this is less than or equal to the given face pair.
other | the pair to compare with this. |
true
if and only if this is less than or equal to other. bool regina::NFacePair::operator>= | ( | const NFacePair & | other | ) | const [inline] |
Determines if this is greater than or equal to the given face pair.
other | the pair to compare with this. |
true
if and only if this is greater than or equal to other. 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.
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.