|
|
| Digraph_Iterator (Node *p) noexcept(noexcept(Filter(p)) and noexcept(Itor(p, filt))) |
| | Instantiate an filtered iterator for arcs on the node p
|
| |
|
void | next_ne () noexcept |
| |
| void | next () |
| |
| void | prev () |
| |
|
void | prev_ne () |
| |
|
bool | has_curr () const noexcept |
| | Return true is the iterator has a current arc.
|
| |
| GT::Arc * | get_curr () const |
| |
|
GT::Arc * | get_curr_ne () const noexcept |
| |
| auto | get_current_arc () const |
| |
|
auto | get_current_arc_ne () const noexcept |
| |
| GT::Node * | get_node (typename GT::Arc *a) const noexcept |
| |
| GT::Node * | get_node_ne () const noexcept |
| |
| auto | get_tgt_node_ne () const noexcept |
| |
|
GT::Node * | get_node () const |
| |
| auto | get_tgt_node () const |
| |
|
void | reset_first () noexcept |
| | Reset the iterator to first arc.
|
| |
|
void | reset_last () noexcept |
| | Reset the iterator to last arc.
|
| |
template<class GT, class Node, class Arc>
template<class Filter>
class GraphCommon< GT, Node, Arc >::Digraph_Iterator< Filter >
Special iterator for distinguishing input arcs of output ones.
The intended use of this iterator is to traverse the ars linked to a node p inserted in a non-directed graph and to filter those arcs that are incoming or outcoming respect to p.
The in/out feature is given by the filter.
For example, for iterating on the input arcs of node p, we can do:
for (GT::Digraph_Iterator<In_Filt> it(p); it.has_curr(); it.next())
auto a = it.get_curr(); // this arc is incoming q --> p
Although this iterator is exclusivelly conceived for dealing with incoming or outcoming arcs. it could be used as filtered iterator. That is, you could to configure the filter for filtering arcs according your own criteria. In this case, we recommend to use the aliased version Filter_Iterator.
Apart from the fact that some arcs are filtered, the interface is identical to the Aleph-w (
) iterators.
- See also
- Out_Iterator In_Iterator Filter_Iterator