|
Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
|
Filtered iterator for incoming arcs of a node of a digraph type. More...
#include <tpl_graph.H>
Private Types | |
| using | Base = graph_dry_detail::In_Arcs_Walk< GT, SA > |
Additional Inherited Members | |
Public Types inherited from Aleph::graph_dry_detail::In_Arcs_Walk< GT, SA > | |
| using | Item_Type = Arc * |
| The type of the items: arcs. | |
Public Member Functions inherited from Aleph::graph_dry_detail::In_Arcs_Walk< GT, SA > | |
| In_Arcs_Walk (const GT &g, Node *p, SA sa=SA()) | |
The arcs of g into p that sa shows, from the first one. | |
| In_Arcs_Walk (Node *, SA sa=SA()) | |
| The form that takes only the node, which does not compile: the list of a node of a digraph holds only the arcs that leave it. | |
| bool | has_curr () const noexcept |
| Return true if there is a current arc. | |
| Arc * | get_curr () const |
Return the current arc. Throws overflow_error if there is none. | |
| Arc * | get_curr_ne () const noexcept |
| Return the current arc, which must exist. | |
| Arc * | get_current_arc () const |
See get_curr(). | |
| Arc * | get_current_arc_ne () const noexcept |
See get_curr_ne(). | |
| Node * | get_node (Arc *a) const noexcept |
Return the source of a. | |
| Node * | get_node () const |
| Return the source of the current arc. | |
| Node * | get_node_ne () const noexcept |
| Return the source of the current arc, which must exist. | |
| Node * | get_tgt_node () const |
| Alias of get_node(). | |
| Node * | get_tgt_node_ne () const noexcept |
| Alias of get_node_ne(). | |
| void | next () |
| Move to the next arc. | |
| void | next_ne () noexcept(shows_ne) |
| Move to the next arc, which must exist; noexcept when the filter is, else what the filter throws goes out. | |
| void | prev () |
| Move to the previous arc. | |
| void | prev_ne () noexcept(shows_ne) |
| prev() without its exception: nothing if there is no current arc; noexcept when the filter is, else what the filter throws goes out. | |
| void | reset_first () |
| Put the walk on the first arc. | |
| void | reset_last () |
| Put the walk on the last arc. | |
| void | end () noexcept |
| Put the walk past the last arc. | |
Static Public Attributes inherited from Aleph::graph_dry_detail::In_Arcs_Walk< GT, SA > | |
| static constexpr bool | goes_back = requires (Arc_Itor & a) { a.prev(); } |
Whether the walk moves back: the arc iterators of List_SGraph and List_SDigraph go only forward. | |
| static constexpr bool | goes_to_last = requires (Arc_Itor & a) { a.reset_last(); a.prev(); } |
| Whether the walk goes to its last arc, which reset_last() needs. | |
Filtered iterator for incoming arcs of a node of a digraph type.
A digraph keeps each arc only in the list of its source: the iterator walks the arcs of the graph, in the order of its arc iterator, and keeps those whose target is the node and that the filter shows; to build it and go through all of them takes \(O(E)\). In_Iterator(g, p, sa) builds it; In_Iterator(p, sa), which would walk only the list of p, does not compile.
| GT | The graph type, built with the Digraph template |
| SA | Arc filter predicate |
Definition at line 2171 of file tpl_graph.H.
|
private |
Definition at line 2173 of file tpl_graph.H.