|
Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
|
Alias for Digraph_Iterator
More...
#include <graph-dry.H>
Public Member Functions | |
| In_Iterator (Node *p) | |
Iterator on the list of p, which holds the arcs into p only in a graph that is not directed. | |
| In_Iterator (const GT &g, Node *p) | |
Iterator on the arcs into p of g, a graph that is not directed: those of the list of p. | |
Public Member Functions inherited from GraphCommon< GT, Node, Arc >::Digraph_Iterator< In_Filt > | |
| Digraph_Iterator (Node *p) | |
Instantiate an filtered iterator for arcs on the node p | |
| void | next_ne () noexcept(shows_ne) |
| next() without its check: the current arc must exist. | |
| void | next () |
| Advance to next arc. | |
| void | prev () |
| back to previous item. | |
| void | prev_ne () |
| prev() without exceptions. Only where the iterator moves back | |
| bool | has_curr () const noexcept |
| Return true is the iterator has a current arc. | |
| GT::Arc * | get_curr () const |
| Return the current arc. | |
| GT::Arc * | get_curr_ne () const noexcept |
| auto | get_current_arc () const |
See get_curr(). | |
| auto | get_current_arc_ne () const noexcept |
| GT::Node * | get_node (typename GT::Arc *a) const noexcept |
Return the node connected to p (passed during construction) and linked through a | |
| GT::Node * | get_node () const |
| GT::Node * | get_node_ne () const noexcept |
Return the node connected to p (passed during construction) and linked through the current arc. | |
| auto | get_tgt_node_ne () const noexcept |
Backward-compatible alias: return target node (same as get_node_ne()). | |
| auto | get_tgt_node () const |
Backward-compatible alias: return target node (same as get_node()). | |
| void | reset_first () noexcept(shows_ne) |
| Reset the iterator to first arc. | |
| void | reset_last () noexcept(shows_ne) |
| Reset the iterator to last arc. | |
Private Types | |
| using | Base = Digraph_Iterator< In_Filt > |
Static Private Member Functions | |
| static void | refuse_a_digraph () |
| static Node * | of_lists (const GT &g, Node *p) |
Additional Inherited Members | |
Public Types inherited from GraphCommon< GT, Node, Arc >::Digraph_Iterator< In_Filt > | |
| using | Item_Type = typename Itor::Item_Type |
| using | Iterator_Type = Itor |
| the type of items (Arc*) | |
Static Public Attributes inherited from GraphCommon< GT, Node, Arc >::Digraph_Iterator< In_Filt > | |
| static constexpr bool | shows_ne |
| Whether what the filter says of an arc cannot throw, nor its conversion to bool: the moves without checks and the resets are noexcept then. | |
| static constexpr bool | goes_back |
Whether the iterator moves back: the iterators of the lists of List_SGraph go only forward, and have no prev() | |
| static constexpr bool | goes_to_last |
| Whether the iterator goes to its last arc, which reset_last() needs. | |
Alias for Digraph_Iterator
Iterator on the arcs that go into a node.
It walks the list of the node, which holds the arcs into it only in a graph that is not directed: a digraph keeps each arc only in the list of its source. So the iterator has two forms:
In_Iterator(p) walks the list of p. On a digraph it sees only the loops of p; the digraph types (see DigraphType) have their own In_Iterator, whose form that takes only the node does not compile.In_Iterator(g, p) takes the graph: it walks the list of p, and throws domain_error if g says that it is directed, as a graph of an undirected type does after set_digraph(true). The In_Iterator of a digraph type walks the arcs of the graph.The methods on the arcs into a node, as in_arcs() and in_degree(), tell a digraph at run time; to go through the arcs into many nodes of a digraph, In_Arcs_Index takes \(O(V + E)\) once.
Definition at line 3429 of file graph-dry.H.
|
private |
Definition at line 3432 of file graph-dry.H.
|
inline |
Iterator on the list of p, which holds the arcs into p only in a graph that is not directed.
| [in] | p | the node. |
Definition at line 3459 of file graph-dry.H.
Iterator on the arcs into p of g, a graph that is not directed: those of the list of p.
| [in] | g | the graph of p. |
| [in] | p | the node. |
| domain_error | if g says that it is directed. |
Definition at line 3471 of file graph-dry.H.
|
inlinestaticprivate |
Definition at line 3446 of file graph-dry.H.
References GraphCommon< GT, Node, Arc >::is_digraph(), and GraphCommon< GT, Node, Arc >::In_Iterator::refuse_a_digraph().
|
inlinestaticprivate |
Definition at line 3437 of file graph-dry.H.
References ah_domain_error.
Referenced by GraphCommon< GT, Node, Arc >::In_Iterator::of_lists().