Regina Calculation Engine
|
Iterates through all directed arcs of a knot or link. More...
#include <link/link.h>
Public Member Functions | |
ArcIterator () | |
Creates a singular iterator. More... | |
ArcIterator (const ArcIterator &)=default | |
Default copy constructor. More... | |
ArcIterator (const Link &link, size_t crossing=0, bool upper=false) | |
Creates a new iterator pointing to the arc exiting the given strand of the given crossing of the given link. More... | |
ArcIterator & | operator++ () |
Preincrement operator. More... | |
ArcIterator | operator++ (int) |
Postincrement operator. More... | |
StrandRef | operator* () const |
Returns the directed arc to which this iterator points. More... | |
ArcIterator & | operator= (const ArcIterator &)=default |
Default assignment operator. More... | |
bool | operator== (const ArcIterator &rhs) const |
Tests whether this and the given iterator are equal. More... | |
bool | operator!= (const ArcIterator &rhs) const |
Tests whether this and the given iterator are different. More... | |
Iterates through all directed arcs of a knot or link.
The order of iteration is as follows. The iterator works through crossings 0,1,... of the underlying link in turn. For each crossing, it visits the arcs exiting the crossing from the lower strand and then the upper strand, in that order.
Zero-crossing unknot components are not visited at all by this iterator type.
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.