Regina Calculation Engine
|
Used to iterate through all dual edges of a dim-dimensional triangulation. More...
#include <triangulation/graph.h>
Public Types | |
typedef FaceList< dim, dim-1 >::Iterator | InternalIterator |
The type used to iterate through (dim-1)-faces of the underlying triangulation. More... | |
Public Member Functions | |
DualEdgeIterator ()=default | |
Creates a singular iterator. More... | |
DualEdgeIterator (const DualEdgeIterator &)=default | |
Default copy constructor. More... | |
DualEdgeIterator (const InternalIterator &it, const InternalIterator &end) | |
Creates a new dual edge iterator corresponding to the given position in the list of (dim-1)-faces of the triangulation. More... | |
DualEdgeIterator & | operator++ () |
Preincrement operator. More... | |
DualEdgeIterator | operator++ (int) |
Postincrement operator. More... | |
DualEdge< dim > | operator* () const |
Returns the dual edge to which this iterator points. More... | |
DualEdgeIterator & | operator= (const DualEdgeIterator &)=default |
Default assignment operator. More... | |
bool | operator== (const DualEdgeIterator &rhs) const |
Tests whether this and the given iterator are equal. More... | |
bool | operator!= (const DualEdgeIterator &rhs) const |
Tests whether this and the given iterator are different. More... | |
Used to iterate through all dual edges of a dim-dimensional triangulation.
Each dual edge is dual to some (dim-1)-face of the underlying triangulation, and the order of iteration will follow the indexing of (dim-1)-faces within the triangulation. Note however that the range of dual edge iterators may be smaller, since a dual edge iterator will skip over those (dim-1)-faces that lie on the boundary of the triangulation.
When a DualEdgeIterator is dereferenced, the resulting dual edge must be given an orientation (as required by the DualEdge class). If the corresponding (dim-1)-face of the triangulation is f, then the orientation of the resulting dual edge will be from f.embedding(0).simplex()
to f.embedding(1).simplex()
. Note that the same dual edge could be given a different orientation if it is obtained by some other means (e.g., by dereferencing an IncidentDualEdgeIterator).
This class implements the Boost multipass input iterator concept, which is similar to the standard C++ forward iterator except that the reference type may be the same as value_type (and so, in particular, the dereference operator may return by value). This header also specialises std::iterator_traits for this iterator type.
dim | the dimension of the underlying triangulation. |
typedef FaceList<dim, dim-1>::Iterator regina::graph::DualEdgeIterator< dim >::InternalIterator |
The type used to iterate through (dim-1)-faces of the underlying triangulation.
|
default |
Creates a singular iterator.
|
default |
Default copy constructor.
|
inline |
Creates a new dual edge iterator corresponding to the given position in the list of (dim-1)-faces of the triangulation.
If it points to a boundary (dim-1)-face, then the dual edge iterator will automatically skip through the list of (dim-1)-faces until it either locates an internal face or moves past-the-end. For this reason, it is not necessarily true that the dual edge *this
will be dual to the (dim-1)-face *it
.
it | the corresponding iterator over the list of all (dim-1)-faces of the underlying triangulation. |
end | the end of the iterator range for all (dim-1)-faces of the underlying triangulation. If the underlying triangulation is t, then this should be t.faces<dim-1>().end() . |
|
inline |
Tests whether this and the given iterator are different.
rhs | the iterator to compare with this. |
true
if and only if the two iterators are different.
|
inline |
Returns the dual edge to which this iterator points.
If the corresponding (dim-1)-face of the triangulation is f, then the resulting dual edge will be oriented from f.embedding(0).simplex()
to f.embedding(1).simplex()
.
|
inline |
Preincrement operator.
|
inline |
Postincrement operator.
|
default |
Default assignment operator.
|
inline |
Tests whether this and the given iterator are equal.
rhs | the iterator to compare with this. |
true
if and only if the two iterators are equal.