|
Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
|
Filtered iterator for outcoming arcs of a node. More...
#include <tpl_graph.H>
Public Types | |
| using | Item_Type = typename GT::Arc * |
Public Types inherited from Aleph::Digraph_Iterator< GT, __Out_Filt< GT > > | |
| using | Item_Type = typename Itor::Item_Type |
| using | Iterator_Type = Itor |
| The type of element. | |
Public Member Functions | |
| Out_Iterator ()=default | |
| Out_Iterator (typename GT::Node *p, Show_Arc sa=Show_Arc()) | |
| void | next () |
| void | next_ne () noexcept(NothrowPredicateWith< Show_Arc &, typename GT::Arc * >) |
| next() without the check of the current arc; noexcept when the filter is, else what the filter throws goes out | |
| void | prev () |
| Move to the previous arc that the filter shows. | |
Public Member Functions inherited from Aleph::Digraph_Iterator< GT, __Out_Filt< GT > > | |
| Digraph_Iterator (typename GT::Node *p) | |
Initialize an iterator on adjacent arcs (incoming or outcoming) of p | |
| void | next () |
| Move the iterator one position forward. | |
| void | next_ne () noexcept(shows_ne) |
| next() without its check: the current arc must exist. | |
| void | prev () |
| Move the iterator one position backward. | |
| bool | has_curr () const noexcept |
Return true the iterator has an current arc. | |
| GT::Arc * | get_curr () const |
| Return the current arc. | |
| GT::Arc * | get_curr_ne () const noexcept |
| Return the current arc. | |
| auto | get_current_arc () const |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Alias for get_curr(). | |
| GT::Node * | get_node (typename GT::Arc *a) const noexcept |
Return the connected node to arc. | |
| GT::Node * | get_node () const |
| Return the connected node to current arc. | |
| auto | get_tgt_node () const |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Alias for get_node(). | |
| GT::Node * | get_node_ne () const noexcept |
| Return the connected node to current arc. | |
| auto | get_tgt_node_ne () const noexcept |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Alias for get_node_ne(). | |
| void | reset_first () noexcept(shows_ne) |
| Reset the iterator to the first arc. | |
| void | reset_last () noexcept(shows_ne) |
| Reset the iterator to the last arc. | |
| void | end () noexcept(shows_ne) |
| Put the iterator in end state. | |
Private Types | |
| using | Base = Digraph_Iterator< GT, __Out_Filt< GT > > |
Private Member Functions | |
| void | goto_first_valid () |
| void | goto_last_valid () |
Private Attributes | |
| Show_Arc | show_arc |
Additional Inherited Members | |
Static Public Attributes inherited from Aleph::Digraph_Iterator< GT, __Out_Filt< GT > > | |
| static constexpr bool | goes_back |
| Iterator type. | |
| static constexpr bool | goes_to_last |
| Whether the iterator goes to its last arc, which reset_last() and end() need. | |
| 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. | |
Filtered iterator for outcoming arcs of a node.
This iterator traverses the outgoing arcs of a node, optionally filtered by the Show_Arc predicate.
| GT | The graph type |
| Show_Arc | Arc filter predicate (default shows all arcs) |
Definition at line 1941 of file tpl_graph.H.
|
private |
Definition at line 1943 of file tpl_graph.H.
| using Aleph::Out_Iterator< GT, Show_Arc >::Item_Type = typename GT::Arc * |
Definition at line 1959 of file tpl_graph.H.
|
default |
|
inline |
Definition at line 1963 of file tpl_graph.H.
References Aleph::Out_Iterator< GT, Show_Arc >::goto_first_valid().
|
inlineprivate |
Definition at line 1946 of file tpl_graph.H.
References Aleph::and, Aleph::Digraph_Iterator< GT, __Out_Filt< GT > >::get_curr_ne(), Aleph::Digraph_Iterator< GT, __Out_Filt< GT > >::has_curr(), Aleph::Digraph_Iterator< GT, __Out_Filt< GT > >::next_ne(), and Aleph::Out_Iterator< GT, Show_Arc >::show_arc.
Referenced by Aleph::Out_Iterator< GT, Show_Arc >::Out_Iterator(), Aleph::Out_Iterator< GT, Show_Arc >::next(), and Aleph::Out_Iterator< GT, Show_Arc >::next_ne().
|
inlineprivate |
Definition at line 1952 of file tpl_graph.H.
References Aleph::and, Aleph::Digraph_Iterator< GT, __Out_Filt< GT > >::get_curr_ne(), Aleph::Digraph_Iterator< GT, __Out_Filt< GT > >::has_curr(), Aleph::Digraph_Iterator< GT, __Out_Filt< GT > >::prev(), and Aleph::Out_Iterator< GT, Show_Arc >::show_arc.
Referenced by Aleph::Out_Iterator< GT, Show_Arc >::prev().
|
inline |
Definition at line 1969 of file tpl_graph.H.
References Aleph::Out_Iterator< GT, Show_Arc >::goto_first_valid(), and Aleph::Digraph_Iterator< GT, __Out_Filt< GT > >::next().
Referenced by TYPED_TEST().
|
inlinenoexcept |
next() without the check of the current arc; noexcept when the filter is, else what the filter throws goes out
Definition at line 1977 of file tpl_graph.H.
References Aleph::Out_Iterator< GT, Show_Arc >::goto_first_valid(), and Aleph::Digraph_Iterator< GT, __Out_Filt< GT > >::next_ne().
|
inline |
Move to the previous arc that the filter shows.
Only where the iterator moves back: not on List_SGraph and List_SDigraph
Definition at line 1985 of file tpl_graph.H.
References Aleph::Out_Iterator< GT, Show_Arc >::goto_last_valid(), and Aleph::Digraph_Iterator< GT, __Out_Filt< GT > >::prev().
|
private |
Definition at line 1944 of file tpl_graph.H.
Referenced by Aleph::Out_Iterator< GT, Show_Arc >::goto_first_valid(), and Aleph::Out_Iterator< GT, Show_Arc >::goto_last_valid().