|
Aleph-w 3.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 |
| Return the current position. | |
| void | reset_first () noexcept |
| void | reset_last () |
| It has O(n) of performance. | |
| void | end () noexcept |
| Set the iterator to its end position, which has not current item. | |
| Iterator & | operator= (const Iterator &it) noexcept |
| Assignation. | |
| bool | has_curr () const noexcept |
Return true if iterator has current item. | |
| 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 |
| Return the current node on which the iterator is positioned. | |
| 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 () |
| Move the iterator one item forward. | |
| Slinknc * | del_ne () noexcept |
| Slinknc * | del () |
| Remove the current item. | |
Private Attributes | |
| HTList * | lptr = nullptr |
| Slinknc * | curr = nullptr |
| Slinknc * | prev = nullptr |
| long | pos = 0 |
|
defaultnoexcept |
|
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 1276 of file htlist.H.
References ah_overflow_error_if, del_ne(), has_curr(), and Aleph::maps().
Referenced by Aleph::DynList< T >::Iterator::del().
|
inlinenoexcept |
Definition at line 1229 of file htlist.H.
References curr, Aleph::HTList::head, lptr, Aleph::maps(), NEXT, prev, Aleph::HTList::remove_first(), Aleph::HTList::reset(), and Aleph::HTList::tail.
Referenced by del().
|
inlinenoexcept |
|
inline |
Return the current node on which the iterator is positioned.
| overflow_error | if iterator has not current node |
Definition at line 1177 of file htlist.H.
References ah_overflow_error_if, and curr.
Referenced by Aleph::DynList< T >::Iterator::get_curr(), Aleph::insert_sorted(), 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 1186 of file htlist.H.
References curr.
Referenced by Aleph::DynList< T >::Iterator::get_curr_ne().
|
inlinenoexcept |
|
inlinenoexcept |
Return true if iterator has current item.
Definition at line 1150 of file htlist.H.
References curr.
Referenced by Aleph::compute_min_cut(), Aleph::Tarjan_Connected_Components< GT, Itor, SA >::connected_components(), del(), Aleph::DynList< T >::get(), Aleph::QuickHull::get_fartest_point(), Aleph::GiftWrappingConvexHull::get_lowest_point(), Aleph::insert_sorted(), Aleph::Net_Graph< NodeT, ArcT >::make_super_sink(), Aleph::Net_Graph< NodeT, ArcT >::make_super_source(), next(), Aleph::Tarjan_Connected_Components< GT, Itor, SA >::operator()(), Aleph::GiftWrappingConvexHull::operator()(), Aleph::QuickHull::operator()(), Aleph::DynList< T >::operator=(), Aleph::QuickHull::partition(), Aleph::DynList< T >::remove(), Aleph::DynList< T >::remove_ne(), Aleph::search_extreme(), Aleph::QuickHull::search_extremes(), Aleph::sequential_search(), Aleph::sequential_search(), Aleph::HTList::size(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().
|
inlinenoexcept |
Return true if the iterator is positioned on the first item.
Definition at line 1158 of file htlist.H.
References curr, Aleph::HTList::head, Aleph::HTList::is_empty(), lptr, and Aleph::maps().
Referenced by TEST().
|
inlinenoexcept |
|
inlinenoexcept |
Definition at line 1152 of file htlist.H.
References curr, Aleph::HTList::is_empty(), lptr, Aleph::maps(), and Aleph::HTList::tail.
Referenced by is_in_last(), TEST(), and TEST().
|
inline |
Move the iterator one item forward.
Throw overflow_error if iterator has not current item
Definition at line 1222 of file htlist.H.
References ah_overflow_error_if, has_curr(), Aleph::maps(), and next_ne().
Referenced by Aleph::GiftWrappingConvexHull::get_lowest_point(), Aleph::insert_sorted(), Aleph::QuickHull::search_extremes(), TEST(), TEST(), TEST(), 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 1190 of file htlist.H.
References curr, Aleph::HTList::head, lptr, Aleph::maps(), NEXT, pos, prev, and Aleph::HTList::tail.
Referenced by Aleph::DynList< T >::get(), Aleph::GiftWrappingConvexHull::get_lowest_point(), Aleph::insert_sorted(), next(), Aleph::search_extreme(), Aleph::QuickHull::search_extremes(), and Aleph::Random_Graph_Base< GT, Init_Node, Init_Arc >::select_random_node().
|
inlinenoexcept |
Reset the iterator at the first item.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
Definition at line 1103 of file htlist.H.
References curr, Aleph::HTList::head, lptr, pos, and prev.
Referenced by reset_first(), reset_last(), and TEST_F().
|
inlinenoexcept |
|
inline |
Definition at line 1085 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().
Definition at line 1084 of file htlist.H.
Referenced by del_ne(), is_in_first(), is_last(), next_ne(), operator=(), reset(), and reset_last().
|
private |
Definition at line 1088 of file htlist.H.
Referenced by get_pos(), next_ne(), operator=(), reset(), and reset_last().
Definition at line 1086 of file htlist.H.
Referenced by del_ne(), next_ne(), operator=(), reset(), and reset_last().