Regina 7.0 Calculation Engine
|
A lightweight class used to refer to a particular facet of a particular top-dimensional simplex in a dim-dimensional triangulation. More...
#include <triangulation/facetspec.h>
Public Member Functions | |
FacetSpec ()=default | |
Creates a new specifier with no initialisation. More... | |
FacetSpec (int newSimp, int newFacet) | |
Creates a new specifier referring to the given facet of the given simplex. More... | |
FacetSpec (const FacetSpec< dim > &cloneMe)=default | |
Creates a new specifier referring to the same simplex facet as the given specifier. More... | |
bool | isBoundary (size_t nSimplices) const |
Determines if this specifier represents the overall boundary. More... | |
bool | isBeforeStart () const |
Determines if this specifier represents a before-the-start value. More... | |
bool | isPastEnd (size_t nSimplices, bool boundaryAlso) const |
Determines if this specifier represents a past-the-end value. More... | |
void | setFirst () |
Sets this specifier to the first facet of the first simplex. More... | |
void | setBoundary (size_t nSimplices) |
Sets this specifier to the overall boundary. More... | |
void | setBeforeStart () |
Sets this specifier to before-the-start. More... | |
void | setPastEnd (size_t nSimplices) |
Sets this specifier to past-the-end. More... | |
FacetSpec & | operator= (const FacetSpec< dim > &other)=default |
Sets this specifier to the value of the given specifier. More... | |
FacetSpec & | operator++ () |
Increments this specifier. More... | |
FacetSpec | operator++ (int) |
Increments this specifier. More... | |
FacetSpec & | operator-- () |
Decrements this specifier. More... | |
FacetSpec | operator-- (int) |
Decrements this specifier. More... | |
bool | operator== (const FacetSpec< dim > &other) const |
Determines if this and the given specifier are identical. More... | |
bool | operator!= (const FacetSpec< dim > &other) const |
Determines if this and the given specifier are not identical. More... | |
bool | operator< (const FacetSpec< dim > &other) const |
Determines if this is less than the given specifier. More... | |
bool | operator<= (const FacetSpec< dim > &other) const |
Determines if this is less than or equal to the given specifier. More... | |
Public Attributes | |
int | simp |
The simplex referred to. More... | |
int | facet |
The facet of the simplex referred to. More... | |
A lightweight class used to refer to a particular facet of a particular top-dimensional simplex in a dim-dimensional triangulation.
Only the simplex index and the facet number are stored.
Facilities are provided for iterating through simplex facets. 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 simplex facets, the facets will be ordered first by simplex index and then by facet number. The overall boundary appears after all other simplex facets.
If there are n simplices, the simplices will be numbered from 0 to n-1 inclusive. The boundary will be represented as simplex n, facet 0. The past-the-end value will be represented as simplex n, facet 1, and the before-the-start value will be represented as simplex -1, facet dim.
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.
dim | the dimension of the underlying triangulation. This must be between 2 and 15 inclusive. |
|
default |
Creates a new specifier with no initialisation.
This specifier must be initialised before it is used.
|
inline |
Creates a new specifier referring to the given facet of the given simplex.
newSimp | the given simplex; see the class notes for allowable values of this parameter. |
newFacet | the given facet; this should be between 0 and dim inclusive. |
|
default |
Creates a new specifier referring to the same simplex facet as the given specifier.
cloneMe | the specifier to clone. |
|
inline |
Determines if this specifier represents a before-the-start value.
true
if and only if this specifier is before-the-start.
|
inline |
Determines if this specifier represents the overall boundary.
nSimplices | the number of simplices under consideration. Note that the boundary is represented in this specifier as simplex nSimplices, facet 0. |
true
if and only if this specifier represents the overall boundary.
|
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.
nSimplices | the number of simplices under consideration. Note that past-the-end is represented in this specifier as simplex nSimplices, facet 1. |
boundaryAlso | true if the overall boundary should be considered past-the-end in addition to the predefined past-the-end value. |
true
if and only if this specifier is past-the-end.
|
inline |
Determines if this and the given specifier are not identical.
other | the specifier to compare with this. |
true
if and only if this and the given specifier are not equal.
|
inline |
Increments this specifier.
It will be changed to point to the next simplex facet.
Facets are ordered first by simplex index and then by facet number. The overall boundary appears after all other facets.
|
inline |
Increments this specifier.
It will be changed to point to the next simplex facet.
Facets are ordered first by simplex index and then by facet number. The overall boundary appears after all other facets.
|
inline |
Decrements this specifier.
It will be changed to point to the previous simplex facet.
Facets are ordered first by simplex index and then by facet number. The overall boundary appears after all other facets.
|
inline |
Decrements this specifier.
It will be changed to point to the previous simplex facet.
Facets are ordered first by simplex index and then by facet number. The overall boundary appears after all other facets.
|
inline |
Determines if this is less than the given specifier.
other | the specifier to compare with this. |
true
if and only if this is less than the given specifier.
|
inline |
Determines if this is less than or equal to the given specifier.
other | the specifier to compare with this. |
true
if and only if this is less than or equal to the given specifier.
|
default |
Sets this specifier to the value of the given specifier.
other | the given specifier. |
|
inline |
Determines if this and the given specifier are identical.
other | the specifier to compare with this. |
true
if and only if this and the given specifier are equal.
|
inline |
Sets this specifier to before-the-start.
|
inline |
Sets this specifier to the overall boundary.
nSimplices | the number of simplices under consideration. Note that the boundary is represented in this specifier as simplex nSimplices, facet 0. |
|
inline |
Sets this specifier to the first facet of the first simplex.
|
inline |
Sets this specifier to past-the-end.
nSimplices | the number of simplices under consideration. Note that past-the-end is represented in this specifier as simplex nSimplices, facet 1. |
int regina::FacetSpec< dim >::facet |
The facet of the simplex referred to.
The facet number is between 0 and dim inclusive.
int regina::FacetSpec< dim >::simp |
The simplex referred to.
Simplex numbering begins at 0.