Regina Calculation Engine
|
Iterates through the two crossings adjacent to a given crossing of a knot or link via an outgoing arc. More...
#include <link/graph.h>
Public Member Functions | |
AdjacentCrossingIterator () | |
Creates a singular iterator. More... | |
AdjacentCrossingIterator (Crossing *crossing, int strand=0) | |
Creates a new iterator that runs through the two crossings adjacent to the given crossing via an outgoing arc. More... | |
AdjacentCrossingIterator (const AdjacentCrossingIterator &)=default | |
Default copy constructor. More... | |
AdjacentCrossingIterator & | operator++ () |
Preincrement operator. More... | |
AdjacentCrossingIterator | operator++ (int) |
Postincrement operator. More... | |
Crossing * | operator* () const |
Returns the adjacent crossing to which this iterator points. More... | |
AdjacentCrossingIterator & | operator= (const AdjacentCrossingIterator &)=default |
Default assignment operator. More... | |
bool | operator== (const AdjacentCrossingIterator &rhs) const |
Tests whether this and the given iterator are equal. More... | |
bool | operator!= (const AdjacentCrossingIterator &rhs) const |
Tests whether this and the given iterator are different. More... | |
Iterates through the two crossings adjacent to a given crossing of a knot or link via an outgoing arc.
The order of iteration is as follows: first this will visit the crossing adjacent via the arc leaving the lower strand of the given crossing; then it will visit the crossing adjacent via the arc leaving the upper strand of the given crossing.
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.
|
inline |
Creates a singular iterator.
|
inline |
Creates a new iterator that runs through the two crossings adjacent to the given crossing via an outgoing arc.
crossing | the crossing whose adjacent crossings we are iterating through. |
strand | 0 if we should begin at the crossing adjacent via the lower strand; 1 if we should begin at the crossing adjacent via the upper strand; or 2 if the iterator should be marked as past-the-end. |
|
default |
Default copy constructor.
|
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 adjacent crossing to which this iterator points.
|
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.