|
Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
|
#include <htlist.H>
Public Member Functions | |
| Iterator () noexcept=default | |
| Iterator (const HTList &list) noexcept | |
Initialize iterator on at the first item of list | |
| void | reset () noexcept |
| Reset the iterator at the first item. | |
| long | get_pos () const noexcept |
| void | reset_first () noexcept |
See reset(). | |
| void | reset_last () |
| It has O(n) of performance. | |
| void | end () noexcept |
| Set the iterator to its end position, which has not. | |
| Iterator (const Iterator &)=default | |
| Iterator & | operator= (const Iterator &it) noexcept |
| bool | has_curr () const noexcept |
| bool | is_last () const noexcept |
| bool | is_in_first () const noexcept |
Return true if the iterator is positioned on the first item. | |
| bool | is_in_last () const noexcept |
Return true if the iterator is positioned on the last item. | |
| Slinknc * | get_curr () const |
| Slinknc * | get_curr_ne () const noexcept |
| Return the current link guaranteeing no exception. Be careful. | |
| void | next_ne () noexcept |
| Move the iterator one position forward guaranteeing no exception. | |
| void | next () |
| Slinknc * | del_ne () noexcept |
| Remove the current item and move the iterator one position forward, without checking that there is a current item. | |
| Slinknc * | del () |
Protected Member Functions | |
| HTList * | get_list_ptr () const noexcept |
| The list of the iterator, for the iterators of the derived lists. | |
Private Attributes | |
| HTList * | lptr = nullptr |
| Slinknc * | curr = nullptr |
| Slinknc * | prev = nullptr |
| long | pos = 0 |
|
defaultnoexcept |
|
inlinenoexcept |
|
default |
|
inline |
Remove the current item.
del() removes the current item of iterator and advaces it a position forward.
| overflow_error | if iterator has not current item |
Definition at line 1097 of file htlist.H.
References ah_overflow_error_if, del_ne(), and has_curr().
Referenced by Aleph::DynList< T >::Iterator::del().
|
inlinenoexcept |
Remove the current item and move the iterator one position forward, without checking that there is a current item.
It checks nothing, as the _ne variants promise: the check of remove_first() throws, and inside noexcept that would end the program.
assert checks: without a current item, the removal reads through a null node. Definition at line 1057 of file htlist.H.
References curr, has_curr(), Aleph::HTList::head, lptr, NEXT, prev, Aleph::HTList::remove_first_ne(), Aleph::Slinknc::reset(), and Aleph::HTList::tail.
Referenced by del(), Aleph::DynList< T >::Iterator::del_ne(), TEST(), and TEST_F().
|
inlinenoexcept |
|
inline |
Return the current node on which the iterator is positioned
| overflow_error | if iterator has not current node |
Definition at line 997 of file htlist.H.
References ah_overflow_error_if, and curr.
Referenced by Aleph::Filter_Iterator< Container, It, Show_Item >::backward(), Aleph::Filter_Iterator< Container, It, Show_Item >::base_curr(), Aleph::DynList< T >::Iterator::get_curr(), Aleph::Filter_Iterator< Container, It, Show_Item >::goto_last_valid_item(), Aleph::insert_sorted(), main(), TEST(), TEST(), TEST(), TEST(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().
|
inlinenoexcept |
Return the current link guaranteeing no exception. Be careful.
Definition at line 1005 of file htlist.H.
References curr.
Referenced by Aleph::Filter_Iterator< Container, It, Show_Item >::base_curr(), Aleph::Filter_Iterator< Container, It, Show_Item >::forward(), Aleph::DynList< T >::Iterator::get_curr_ne(), and TEST_F().
|
inlineprotectednoexcept |
The list of the iterator, for the iterators of the derived lists.
Definition at line 901 of file htlist.H.
References lptr.
Referenced by Aleph::DynList< T >::Iterator::list_ptr().
|
inlinenoexcept |
|
inlinenoexcept |
Definition at line 969 of file htlist.H.
References curr.
Referenced by Aleph::Filter_Iterator< Container, It, Show_Item >::backward(), Aleph::compute_min_cut(), Aleph::Tarjan_Connected_Components< GT, Itor, SA >::connected_components(), count_elements(), Aleph::sort_utils_detail::counting_sort_impl(), del(), Aleph::DynList< T >::Iterator::del(), del_ne(), GraphCommon< GT, Node, Arc >::for_each_arc(), GraphCommon< GT, Node, Arc >::for_each_arc(), GraphCommon< GT, Node, Arc >::for_each_node(), Aleph::Filter_Iterator< Container, It, Show_Item >::forward(), Aleph::DynList< T >::get(), Aleph::Filter_Iterator< Container, It, Show_Item >::goto_first_valid_item(), Aleph::Filter_Iterator< Container, It, Show_Item >::goto_last_valid_item(), Aleph::insert_sorted(), Aleph::Random_Digraph< GT, Init_Node, Init_Arc >::join_through_a_path(), Aleph::Random_Graph< GT, Init_Node, Init_Arc >::join_through_the_complement(), main(), main(), next(), Aleph::Dfs_Arc_Frame< It >::next_target(), Aleph::Tarjan_Connected_Components< GT, Itor, SA >::operator()(), print(), Aleph::DynList< T >::remove(), Aleph::DynList< T >::remove_ne(), GraphCommon< GT, Node, Arc >::search_arc(), GraphCommon< GT, Node, Arc >::search_arc(), GraphCommon< GT, Node, Arc >::search_arc(), Aleph::search_extreme(), GraphCommon< GT, Node, Arc >::search_node(), Aleph::sequential_search(), Aleph::HTList::size(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), test_DynSet(), test_DynSetLinHash(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), GraphCommon< GT, Node, Arc >::traverse_arcs(), GraphCommon< GT, Node, Arc >::traverse_arcs(), GraphCommon< GT, Node, Arc >::traverse_nodes(), TYPED_TEST(), TYPED_TEST(), TYPED_TEST(), TYPED_TEST(), TYPED_TEST(), TYPED_TEST(), and TYPED_TEST().
|
inlinenoexcept |
Return true if the iterator is positioned on the first item.
Definition at line 980 of file htlist.H.
References curr, Aleph::HTList::head, Aleph::HTList::is_empty(), and lptr.
Referenced by TEST().
|
inlinenoexcept |
|
inlinenoexcept |
Definition at line 974 of file htlist.H.
References curr, Aleph::HTList::is_empty(), lptr, and Aleph::HTList::tail.
Referenced by is_in_last(), TEST(), TEST(), and TEST_F().
|
inline |
Move the iterator one item forward. Throw overflow_error if
iterator has not current item
Definition at line 1040 of file htlist.H.
References ah_overflow_error_if, has_curr(), and next_ne().
Referenced by Aleph::insert_sorted(), main(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().
|
inlinenoexcept |
Move the iterator one position forward guaranteeing no exception.
Be careful.
Definition at line 1012 of file htlist.H.
References curr, Aleph::HTList::head, lptr, NEXT, pos, prev, and Aleph::HTList::tail.
Referenced by Aleph::Tarjan_Connected_Components< GT, Itor, SA >::connected_components(), Aleph::sort_utils_detail::counting_sort_impl(), Aleph::DynList< T >::get(), Aleph::insert_sorted(), next(), Aleph::search_extreme(), Aleph::Random_Graph_Base< GT, Init_Node, Init_Arc >::select_random_node(), TEST(), TEST(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().
|
inlinenoexcept |
Reset the iterator at the first item.
Definition at line 919 of file htlist.H.
References curr, Aleph::HTList::head, lptr, pos, and prev.
Referenced by reset_first(), reset_last(), and TEST_F().
|
inlinenoexcept |
|
inline |
|
private |
Definition at line 894 of file htlist.H.
Referenced by del_ne(), end(), get_curr(), get_curr_ne(), has_curr(), is_in_first(), is_last(), next_ne(), operator=(), reset(), and reset_last().
|
private |
Definition at line 893 of file htlist.H.
Referenced by del_ne(), get_list_ptr(), is_in_first(), is_last(), next_ne(), operator=(), reset(), and reset_last().
|
private |
Definition at line 897 of file htlist.H.
Referenced by get_pos(), next_ne(), operator=(), reset(), and reset_last().
|
private |
Definition at line 895 of file htlist.H.
Referenced by del_ne(), next_ne(), operator=(), reset(), and reset_last().