|
Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
|
Read-only iterator on the arcs of a node. More...
#include <tpl_const_graph_view.H>
Public Types | |
| using | Item_Type = const typename GT::Arc * |
| The type of the items: a pointer to a constant arc. | |
| using | Set_Type = const typename GT::Node * |
| The type of what is iterated: a constant node. | |
Public Types inherited from Aleph::Const_Iterator< GT::Node_Arc_Iterator > | |
| using | Itor = GT::Node_Arc_Iterator |
| The underlying iterator. | |
| using | aleph_random_access_iterator = std::conditional_t< AlephRandomAccessItor< GT::Node_Arc_Iterator >, Const_Iterator, void > |
| Random access when the underlying iterator opts in; see AlephRandomAccessItor. | |
Public Member Functions | |
| Const_Node_Arc_Iterator ()=default | |
| An iterator with no current arc. | |
| Const_Node_Arc_Iterator (const typename GT::Node *p) | |
Iterator positioned on the first arc of the node p. | |
| Item_Type | get_current_arc () const |
| The current arc. | |
| Item_Type | get_current_arc_ne () const noexcept |
| get_current_arc() without checking that there is a current arc. | |
| const GT::Node * | get_tgt_node () const |
| The node at the other end of the current arc. | |
| const GT::Node * | get_tgt_node_ne () const noexcept |
| get_tgt_node() without checking that there is a current arc. | |
Public Member Functions inherited from Aleph::Const_Iterator< GT::Node_Arc_Iterator > | |
| Const_Iterator ()=default | |
| A view with no current item. | |
| Const_Iterator (const C &c) | |
View positioned on the first item of the container c. | |
| Const_Iterator (GT::Node_Arc_Iterator underlying) noexcept(std::is_nothrow_move_constructible_v< GT::Node_Arc_Iterator >) | |
| Read-only view over an existing iterator. | |
| auto | has_curr () const noexcept(noexcept(std::declval< I & >().has_curr())) -> decltype(std::declval< I & >().has_curr()) |
true if there is a current item. | |
| auto | get_curr () const noexcept(noexcept(std::declval< I & >().get_curr())) -> const_iterator_detail::const_item_t< decltype(std::declval< I & >().get_curr())> |
| The current item, read-only. | |
| auto | get_curr_ne () const noexcept(noexcept(std::declval< I & >().get_curr_ne())) -> const_iterator_detail::const_item_t< decltype(std::declval< I & >().get_curr_ne())> |
| get_curr() without the checks of the underlying iterator. | |
| auto | next () noexcept(noexcept(std::declval< I & >().next())) -> decltype(std::declval< I & >().next()) |
| Move to the next item; what the underlying iterator throws. | |
| auto | next_ne () noexcept(noexcept(std::declval< I & >().next_ne())) -> decltype(std::declval< I & >().next_ne()) |
| next() without checks. | |
| auto | prev () noexcept(noexcept(std::declval< I & >().prev())) -> decltype(std::declval< I & >().prev()) |
| Move to the previous item; what the underlying iterator throws. | |
| auto | prev_ne () noexcept(noexcept(std::declval< I & >().prev_ne())) -> decltype(std::declval< I & >().prev_ne()) |
| prev() without checks. | |
| auto | reset_first () noexcept(noexcept(std::declval< I & >().reset_first())) -> decltype(std::declval< I & >().reset_first()) |
| Position the view on the first item. | |
| auto | reset_last () noexcept(noexcept(std::declval< I & >().reset_last())) -> decltype(std::declval< I & >().reset_last()) |
| Position the view on the last item. | |
| auto | reset () noexcept(noexcept(std::declval< I & >().reset())) -> decltype(std::declval< I & >().reset()) |
| Position the view on the first item. | |
| auto | end () noexcept(noexcept(std::declval< I & >().end())) -> decltype(std::declval< I & >().end()) |
| Position the view past the last item. | |
| auto | get_pos () const noexcept(noexcept(std::declval< I & >().get_pos())) -> decltype(std::declval< I & >().get_pos()) |
| Ordinal position of the current item. | |
| auto | set_pos (const long pos) noexcept(noexcept(std::declval< I & >().set_pos(pos))) -> decltype(std::declval< I & >().set_pos(pos)) |
Position the view on the item at ordinal position pos. | |
| auto | is_last () const noexcept(noexcept(std::declval< I & >().is_last())) -> decltype(std::declval< I & >().is_last()) |
true if the current item is the last one. | |
| auto | is_in_first () const noexcept(noexcept(std::declval< I & >().is_in_first())) -> decltype(std::declval< I & >().is_in_first()) |
true if the current item is the first one. | |
| auto | is_in_last () const noexcept(noexcept(std::declval< I & >().is_in_last())) -> decltype(std::declval< I & >().is_in_last()) |
true if the current item is the last one. | |
| void | swap (Const_Iterator &other) noexcept(std::is_nothrow_swappable_v< GT::Node_Arc_Iterator >) |
| Exchange the views. | |
| auto | operator== (const Const_Iterator &other) const -> decltype(std::declval< I & >()==std::declval< I & >()) |
| Equality of the underlying iterators, when they have it. | |
| auto | operator!= (const Const_Iterator &other) const -> decltype(not(std::declval< I & >()==std::declval< I & >())) |
Negation of ==. | |
Private Types | |
| using | Base = Const_Iterator< typename GT::Node_Arc_Iterator > |
Additional Inherited Members | |
Protected Member Functions inherited from Aleph::Const_Iterator< GT::Node_Arc_Iterator > | |
| GT::Node_Arc_Iterator & | underlying () const noexcept |
The underlying iterator, for the views that extend the reading protocol with members of their own (the read-only iterators of the graphs do it with get_src_node() and get_tgt_node()). | |
Read-only iterator on the arcs of a node.
Wraps GT::Node_Arc_Iterator: it visits what that iterator visits (the arcs adjacent to the node; on a directed graph class, its outgoing arcs) and hands out const Arc * and const Node *.
| GT | the graph type. |
Definition at line 310 of file tpl_const_graph_view.H.
|
private |
Definition at line 313 of file tpl_const_graph_view.H.
| using Aleph::Const_Node_Arc_Iterator< GT >::Item_Type = const typename GT::Arc * |
The type of the items: a pointer to a constant arc.
Definition at line 321 of file tpl_const_graph_view.H.
| using Aleph::Const_Node_Arc_Iterator< GT >::Set_Type = const typename GT::Node * |
The type of what is iterated: a constant node.
Definition at line 324 of file tpl_const_graph_view.H.
|
default |
An iterator with no current arc.
|
inlineexplicit |
Iterator positioned on the first arc of the node p.
| [in] | p | a node of the graph; it is not modified through the iterator. |
Definition at line 333 of file tpl_const_graph_view.H.
|
inline |
The current arc.
| std::overflow_error | if there is no current arc. |
Definition at line 340 of file tpl_const_graph_view.H.
References Aleph::Const_Iterator< GT::Node_Arc_Iterator >::get_curr().
|
inlinenoexcept |
get_current_arc() without checking that there is a current arc.
Definition at line 343 of file tpl_const_graph_view.H.
References Aleph::Const_Iterator< GT::Node_Arc_Iterator >::get_curr_ne().
|
inline |
The node at the other end of the current arc.
| std::overflow_error | if there is no current arc. |
Definition at line 353 of file tpl_const_graph_view.H.
References Aleph::Const_Iterator< GT::Node_Arc_Iterator >::underlying().
|
inlinenoexcept |
get_tgt_node() without checking that there is a current arc.
Definition at line 359 of file tpl_const_graph_view.H.
References Aleph::Const_Iterator< GT::Node_Arc_Iterator >::underlying().