Regina Calculation Engine
|
Stores the list of all subdim-faces of a dim-dimensional triangulation. More...
#include <triangulation/generic.h>
Public Types | |
typedef std::vector< Face< dim, subdim > * >::const_iterator | Iterator |
An iterator type for iterating through this list of faces. More... | |
Public Member Functions | |
FaceList (const FaceList &)=delete | |
Explicitly disable the copy constructor. More... | |
FaceList & | operator= (const FaceList &)=delete |
Explicitly disable the assignment operator. More... | |
size_t | size () const |
Returns the number of subdim-faces in the triangulation. More... | |
Face< dim, subdim > * | operator[] (size_t index) const |
Returns the requested subdim-face. More... | |
Iterator | begin () const |
Returns an iterator pointing to the first subdim-face. More... | |
Iterator | end () const |
Returns an iterator pointing beyond the last subdim-face. More... | |
Protected Member Functions | |
FaceList ()=default | |
Creates an empty list of subdim-faces. More... | |
void | push_back (Face< dim, subdim > *face) |
Pushes the given face onto the end of this list. More... | |
void | destroy () |
Destroys all faces in this list, and clears the list itself. More... | |
void | swap (FaceList< dim, subdim > &other) |
Swaps all faces in this list with those in the given list. More... | |
bool | sameDegrees (const FaceList< dim, subdim > &other) const |
Tests whether this and the given triangulation have the same subdim-face degree sequences. More... | |
template<typename Iterator > | |
void | reorderFaces (Iterator begin, Iterator end) |
Reorders this list of faces. More... | |
Stores the list of all subdim-faces of a dim-dimensional triangulation.
This object provides basic container-like behaviour. It supports begin(), end(), size(), and the random access operator []
. In particular, you can iterate through all subdim-faces using C++11 range-based for
loops: for (auto f : faceList) { ... }
.
Strictly speaking, this list holds pointers to Face<dim, subdim> objects. So, for example, dereferencing an iterator will return a pointer of type Face<dim, subdim>*
. Likewise, the variable f in the range-based for
loop above will be a pointer of type Face<dim, subdim>*
.
The routine Face::index() will always return the index of the corresponding face in this list.
dim | the dimension of the underlying triangulation. This must be between 2 and 15 inclusive. |
subdim | the dimension of the faces that this class stores. This must be between 0 and dim-1 inclusive. |