|
Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
|
Iterator on the arcs into a node, in the order of the arc iterator of the graph when the index was built. More...
#include <tpl_graph.H>
Public Types | |
| using | Item_Type = Arc * |
| The type of the items: arcs. | |
Public Member Functions | |
| Iterator () noexcept=default | |
| An iterator without arcs. | |
| Iterator (Arc *const *a, const long n) noexcept | |
| An iterator on the n arcs from a. | |
| Iterator (const In_Arcs_Index &index, const Node *p) | |
An iterator on the arcs into p of index. | |
| bool | has_curr () const noexcept |
| Return true if the iterator is on an arc. | |
| Arc * | get_curr_ne () const noexcept |
| Return the current arc, which must exist. | |
| Arc * | get_curr () const |
| Return the current arc. | |
| Arc * | get_current_arc_ne () const noexcept |
See get_curr_ne(). | |
| Arc * | get_current_arc () const |
See get_curr(). | |
| Node * | get_node_ne () const noexcept |
| Return the source of the current arc, which must exist. | |
| Node * | get_node () const |
| Return the source of the current arc. Throws as get_curr(). | |
| void | next_ne () noexcept |
| Move to the next arc; the iterator must be on an arc. | |
| void | next () |
| Move to the next arc. | |
| void | prev_ne () noexcept |
| Move to the previous arc; the iterator must be on an arc. | |
| void | prev () |
| Move to the previous arc. | |
| void | reset_first () noexcept |
| Put the iterator on the first arc. | |
| void | reset_last () noexcept |
| Put the iterator on the last arc. | |
| void | end () noexcept |
| Put the iterator past the last arc. | |
| size_t | size () const noexcept |
| Return the number of arcs of the iterator. | |
Private Attributes | |
| Arc *const * | arcs = nullptr |
| long | num = 0 |
| long | pos = 0 |
Iterator on the arcs into a node, in the order of the arc iterator of the graph when the index was built.
It is valid while its index lives.
Definition at line 2278 of file tpl_graph.H.
| using Aleph::In_Arcs_Index< GT, SA >::Iterator::Item_Type = Arc * |
The type of the items: arcs.
Definition at line 2286 of file tpl_graph.H.
|
defaultnoexcept |
An iterator without arcs.
|
inlinenoexcept |
An iterator on the n arcs from a.
Definition at line 2292 of file tpl_graph.H.
|
inline |
An iterator on the arcs into p of index.
| [in] | index | the index. |
| [in] | p | a node of the graph of the index. |
| domain_error | if p was not a node of the graph. |
Definition at line 2300 of file tpl_graph.H.
|
inlinenoexcept |
Put the iterator past the last arc.
Definition at line 2371 of file tpl_graph.H.
References Aleph::In_Arcs_Index< GT, SA >::Iterator::num, and Aleph::In_Arcs_Index< GT, SA >::Iterator::pos.
|
inline |
Return the current arc.
| underflow_error | if the iterator is before the first arc. |
| overflow_error | if the iterator is past the last arc. |
Definition at line 2313 of file tpl_graph.H.
References ah_overflow_error_if, ah_underflow_error_if, Aleph::In_Arcs_Index< GT, SA >::Iterator::get_curr_ne(), Aleph::In_Arcs_Index< GT, SA >::Iterator::num, and Aleph::In_Arcs_Index< GT, SA >::Iterator::pos.
Referenced by Aleph::In_Arcs_Index< GT, SA >::Iterator::get_current_arc(), and Aleph::In_Arcs_Index< GT, SA >::Iterator::get_node().
|
inlinenoexcept |
Return the current arc, which must exist.
Definition at line 2306 of file tpl_graph.H.
References Aleph::In_Arcs_Index< GT, SA >::Iterator::arcs, and Aleph::In_Arcs_Index< GT, SA >::Iterator::pos.
Referenced by Aleph::In_Arcs_Index< GT, SA >::Iterator::get_curr(), Aleph::In_Arcs_Index< GT, SA >::Iterator::get_current_arc_ne(), and Aleph::In_Arcs_Index< GT, SA >::Iterator::get_node_ne().
|
inline |
See get_curr().
Definition at line 2324 of file tpl_graph.H.
References Aleph::In_Arcs_Index< GT, SA >::Iterator::get_curr().
|
inlinenoexcept |
See get_curr_ne().
Definition at line 2321 of file tpl_graph.H.
References Aleph::In_Arcs_Index< GT, SA >::Iterator::get_curr_ne().
|
inline |
Return the source of the current arc. Throws as get_curr().
Definition at line 2333 of file tpl_graph.H.
References Aleph::In_Arcs_Index< GT, SA >::Iterator::get_curr().
|
inlinenoexcept |
Return the source of the current arc, which must exist.
Definition at line 2327 of file tpl_graph.H.
References Aleph::In_Arcs_Index< GT, SA >::Iterator::get_curr_ne().
|
inlinenoexcept |
Return true if the iterator is on an arc.
Definition at line 2303 of file tpl_graph.H.
References Aleph::and, Aleph::In_Arcs_Index< GT, SA >::Iterator::num, and Aleph::In_Arcs_Index< GT, SA >::Iterator::pos.
Referenced by Aleph::In_Arcs_Index< GT, SA >::Iterator::next(), and Aleph::In_Arcs_Index< GT, SA >::Iterator::prev().
|
inline |
Move to the next arc.
| overflow_error | if the iterator is not on an arc. |
Definition at line 2345 of file tpl_graph.H.
References ah_overflow_error_if, Aleph::In_Arcs_Index< GT, SA >::Iterator::has_curr(), and Aleph::In_Arcs_Index< GT, SA >::Iterator::next_ne().
|
inlinenoexcept |
Move to the next arc; the iterator must be on an arc.
Definition at line 2339 of file tpl_graph.H.
References Aleph::In_Arcs_Index< GT, SA >::Iterator::pos.
Referenced by Aleph::In_Arcs_Index< GT, SA >::Iterator::next().
|
inline |
Move to the previous arc.
| underflow_error | if the iterator is not on an arc. |
Definition at line 2358 of file tpl_graph.H.
References ah_underflow_error_if, Aleph::In_Arcs_Index< GT, SA >::Iterator::has_curr(), and Aleph::In_Arcs_Index< GT, SA >::Iterator::prev_ne().
|
inlinenoexcept |
Move to the previous arc; the iterator must be on an arc.
Definition at line 2352 of file tpl_graph.H.
References Aleph::In_Arcs_Index< GT, SA >::Iterator::pos.
Referenced by Aleph::In_Arcs_Index< GT, SA >::Iterator::prev().
|
inlinenoexcept |
Put the iterator on the first arc.
Definition at line 2365 of file tpl_graph.H.
References Aleph::In_Arcs_Index< GT, SA >::Iterator::pos.
|
inlinenoexcept |
Put the iterator on the last arc.
Definition at line 2368 of file tpl_graph.H.
References Aleph::In_Arcs_Index< GT, SA >::Iterator::num, and Aleph::In_Arcs_Index< GT, SA >::Iterator::pos.
|
inlinenoexcept |
Return the number of arcs of the iterator.
Definition at line 2374 of file tpl_graph.H.
References Aleph::In_Arcs_Index< GT, SA >::Iterator::num.
|
private |
Definition at line 2280 of file tpl_graph.H.
Referenced by Aleph::In_Arcs_Index< GT, SA >::Iterator::get_curr_ne().
|
private |
Definition at line 2281 of file tpl_graph.H.
Referenced by Aleph::In_Arcs_Index< GT, SA >::Iterator::end(), Aleph::In_Arcs_Index< GT, SA >::Iterator::get_curr(), Aleph::In_Arcs_Index< GT, SA >::Iterator::has_curr(), Aleph::In_Arcs_Index< GT, SA >::Iterator::reset_last(), and Aleph::In_Arcs_Index< GT, SA >::Iterator::size().
|
private |
Definition at line 2282 of file tpl_graph.H.
Referenced by Aleph::In_Arcs_Index< GT, SA >::Iterator::end(), Aleph::In_Arcs_Index< GT, SA >::Iterator::get_curr(), Aleph::In_Arcs_Index< GT, SA >::Iterator::get_curr_ne(), Aleph::In_Arcs_Index< GT, SA >::Iterator::has_curr(), Aleph::In_Arcs_Index< GT, SA >::Iterator::next_ne(), Aleph::In_Arcs_Index< GT, SA >::Iterator::prev_ne(), Aleph::In_Arcs_Index< GT, SA >::Iterator::reset_first(), and Aleph::In_Arcs_Index< GT, SA >::Iterator::reset_last().