Bifrost
|
Iterator for the neighbors (predecessors or successors) of a reference unitig used in a UnitigMap object. More...
Inherits iterator< std::input_iterator_tag, UnitigMap< void, void, false >, int >.
Public Member Functions | |
neighborIterator () | |
Constructor. More... | |
neighborIterator (const UnitigMap< U, G, is_const > &um_, const bool is_forward_) | |
Constructor. More... | |
neighborIterator (const neighborIterator &o) | |
Copy constructor. More... | |
neighborIterator & | operator++ () |
Prefix increment, iterate over the next neighbor (predecessor or successor). More... | |
neighborIterator | operator++ (int) |
Postfix increment, iterate over the next neighbor (predecessor or successor). More... | |
bool | operator== (const neighborIterator &o) const |
Equality operator: check if two neighborIterator are the same. More... | |
bool | operator!= (const neighborIterator &o) const |
Inequality operator: check if two neighborIterator are different. More... | |
const UnitigMap< U, G, is_const > & | operator* () const |
Indirection operator. More... | |
const UnitigMap< U, G, is_const > * | operator-> () const |
Dereference operator. More... | |
Iterator for the neighbors (predecessors or successors) of a reference unitig used in a UnitigMap object.
A neighborIterator object has 3 template parameters: the type of data associated with the unitigs of the graph, the type of data associated with the graph and a boolean indicating if this is a constant iterator or not. Note that you are supposed to use this class as the iterator of a BackwardCDBG or ForwardCDBG object, which can be obtained respectively from UnitigMap::getPredecessors() and UnitigMap::getSuccessors(), so you shouldn't have to instantiate an object neighborIterator and its template parameters yourself. The unitig data and graph data types should be the same as the ones used for the CompactedDBG the iterator is from. No specific order (such as a lexicographic one) is assumed during iteration.
neighborIterator< Unitig_data_t, Graph_data_t, is_const >::neighborIterator | ( | ) |
Constructor.
neighborIterator< Unitig_data_t, Graph_data_t, is_const >::neighborIterator | ( | const UnitigMap< U, G, is_const > & | um_, |
const bool | is_forward_ | ||
) |
Constructor.
um_ | is a UnitigMap object: the constructed neighborIterator will iterate over the neighbors of the UnitigMap reference unitig |
is_forward_ | indicates if the iterator must iterate over the successors (true) or the predecessors (false) |
neighborIterator< Unitig_data_t, Graph_data_t, is_const >::neighborIterator | ( | const neighborIterator< Unitig_data_t, Graph_data_t, is_const > & | o | ) |
Copy constructor.
bool neighborIterator< Unitig_data_t, Graph_data_t, is_const >::operator!= | ( | const neighborIterator< Unitig_data_t, Graph_data_t, is_const > & | o | ) | const |
Inequality operator: check if two neighborIterator are different.
o | is another neighborIterator. |
const UnitigMap<U, G, is_const>& neighborIterator< Unitig_data_t, Graph_data_t, is_const >::operator* | ( | ) | const |
Indirection operator.
neighborIterator& neighborIterator< Unitig_data_t, Graph_data_t, is_const >::operator++ | ( | ) |
Prefix increment, iterate over the next neighbor (predecessor or successor).
Note that no specific order (such as a lexicographic one) is assumed during iteration.
neighborIterator neighborIterator< Unitig_data_t, Graph_data_t, is_const >::operator++ | ( | int | ) |
Postfix increment, iterate over the next neighbor (predecessor or successor).
Note that no specific order (such as a lexicographic one) is assumed during iteration.
const UnitigMap<U, G, is_const>* neighborIterator< Unitig_data_t, Graph_data_t, is_const >::operator-> | ( | ) | const |
Dereference operator.
bool neighborIterator< Unitig_data_t, Graph_data_t, is_const >::operator== | ( | const neighborIterator< Unitig_data_t, Graph_data_t, is_const > & | o | ) | const |
Equality operator: check if two neighborIterator are the same.
o | is another neighborIterator. |