Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
Aleph::HTList::Iterator Class Reference

#include <htlist.H>

Inheritance diagram for Aleph::HTList::Iterator:
[legend]
Collaboration diagram for Aleph::HTList::Iterator:
[legend]

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
 
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
 
Iteratoroperator= (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.
 
Slinkncget_curr () const
 
Slinkncget_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 ()
 
Slinkncdel_ne () noexcept
 
Slinkncdel ()
 

Private Attributes

HTListlptr = nullptr
 
Slinknccurr = nullptr
 
Slinkncprev = nullptr
 
long pos = 0
 

Detailed Description

Iterator on HTList.

Definition at line 859 of file htlist.H.

Constructor & Destructor Documentation

◆ Iterator() [1/3]

Aleph::HTList::Iterator::Iterator ( )
defaultnoexcept

◆ Iterator() [2/3]

Aleph::HTList::Iterator::Iterator ( const HTList list)
inlinenoexcept

Initialize iterator on at the first item of list

list

Definition at line 874 of file htlist.H.

◆ Iterator() [3/3]

Aleph::HTList::Iterator::Iterator ( const Iterator )
default

Member Function Documentation

◆ del()

Slinknc * Aleph::HTList::Iterator::del ( )
inline
   Remove the current item.

del() removes the current item of iterator and advaces it a position forward.

Returns
a valid pointer to the removed item
Exceptions
overflow_errorif iterator has not current item

Definition at line 1038 of file htlist.H.

References ah_overflow_error_if, del_ne(), Aleph::divide_and_conquer_partition_dp(), and has_curr().

Referenced by Aleph::DynList< T >::Iterator::del().

◆ del_ne()

Slinknc * Aleph::HTList::Iterator::del_ne ( )
inlinenoexcept

◆ end()

void Aleph::HTList::Iterator::end ( )
inlinenoexcept

Set the iterator to its end position, which has not.

Definition at line 910 of file htlist.H.

References curr.

Referenced by TEST().

◆ get_curr()

Slinknc * Aleph::HTList::Iterator::get_curr ( ) const
inline
Return the current node on which the iterator is positioned
Exceptions
overflow_errorif iterator has not current node

Definition at line 952 of file htlist.H.

References ah_overflow_error_if, and curr.

Referenced by Aleph::DynList< T >::Iterator::get_curr(), Aleph::insert_sorted(), main(), TEST(), TEST(), TEST(), TEST(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().

◆ get_curr_ne()

Slinknc * Aleph::HTList::Iterator::get_curr_ne ( ) const
inlinenoexcept

Return the current link guaranteeing no exception. Be careful.

Definition at line 961 of file htlist.H.

References curr.

Referenced by Aleph::DynList< T >::Iterator::get_curr_ne().

◆ get_pos()

long Aleph::HTList::Iterator::get_pos ( ) const
inlinenoexcept

Definition at line 888 of file htlist.H.

References pos.

Referenced by TEST().

◆ has_curr()

bool Aleph::HTList::Iterator::has_curr ( ) const
inlinenoexcept

Definition at line 930 of file htlist.H.

References curr.

Referenced by Aleph::BruteForceConvexHull::are_all_points_on_left(), brute_distance_squared(), Aleph::RangeTree2D::build(), Aleph::ShortestPathInPolygon::build_tris(), Aleph::k_shortest_paths_detail::compose_candidate(), Aleph::k_shortest_paths_detail::compose_general_candidate(), Aleph::k_shortest_paths_detail::compute_cost_from_arcs(), Aleph::compute_min_cut(), Aleph::Tarjan_Connected_Components< GT, Itor, SA >::connected_components(), Aleph::sort_utils_detail::counting_sort_impl(), del(), Aleph::BruteForceConvexHull::extreme_edges(), Aleph::DynList< T >::get(), Aleph::QuickHull::get_farthest_point(), Aleph::GiftWrappingConvexHull::get_lowest_point(), Aleph::insert_sorted(), main(), main(), Aleph::Net_Graph< NodeT, ArcT >::make_super_sink(), Aleph::Net_Graph< NodeT, ArcT >::make_super_source(), Aleph::ConstrainedDelaunayTriangulation::map_constraints(), Aleph::ConstrainedDelaunayTriangulation::merge_and_deduplicate(), next(), Aleph::ClosestPairDivideAndConquer::operator()(), Aleph::DelaunayTriangulationRandomizedIncremental::operator()(), Aleph::GiftWrappingConvexHull::operator()(), Aleph::QuickHull::operator()(), Aleph::MinimumEnclosingCircle::operator()(), Aleph::VisvalingamWhyattSimplification::operator()(), Aleph::DouglasPeuckerSimplification::operator()(), Aleph::ChaikinSmoothing::operator()(), Aleph::Tarjan_Connected_Components< GT, Itor, SA >::operator()(), Aleph::ConvexPolygonDecomposition::operator()(), Aleph::VisibilityPolygon::operator()(), Aleph::MonotonePolygonTriangulation::operator()(), Aleph::DynList< T >::operator=(), Aleph::QuickHull::partition(), Aleph::polygon_from_vertex_indices(), print(), Aleph::put_monotone_triangulation_result(), Aleph::put_path(), Aleph::put_point_labels(), Aleph::put_points(), Aleph::DynList< T >::remove(), Aleph::DynList< T >::remove_ne(), Aleph::search_extreme(), Aleph::search_extreme(), Aleph::QuickHull::search_extremes(), Aleph::sequential_search(), Aleph::sequential_search(), Aleph::HTList::size(), Aleph::AndrewMonotonicChainConvexHull::sorted_unique_points(), Aleph::GrahamScanConvexHull::sorted_unique_points(), Aleph::detail::spp_build_tris(), Aleph::k_shortest_paths_detail::state_to_path(), 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(), and Aleph::DelaunayTriangulationBowyerWatson::unique_points().

◆ is_in_first()

bool Aleph::HTList::Iterator::is_in_first ( ) const
inlinenoexcept

Return true if the iterator is positioned on the first item.

Definition at line 938 of file htlist.H.

References curr, Aleph::divide_and_conquer_partition_dp(), Aleph::HTList::head, Aleph::HTList::is_empty(), and lptr.

Referenced by TEST().

◆ is_in_last()

bool Aleph::HTList::Iterator::is_in_last ( ) const
inlinenoexcept

Return true if the iterator is positioned on the last item.

Definition at line 944 of file htlist.H.

References is_last().

Referenced by TEST().

◆ is_last()

bool Aleph::HTList::Iterator::is_last ( ) const
inlinenoexcept

◆ next()

void Aleph::HTList::Iterator::next ( )
inline

◆ next_ne()

◆ operator=()

Iterator & Aleph::HTList::Iterator::operator= ( const Iterator it)
inlinenoexcept

Definition at line 919 of file htlist.H.

References curr, lptr, pos, and prev.

◆ reset()

Aleph::HTList::Iterator::reset ( )
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 880 of file htlist.H.

References curr, Aleph::HTList::head, lptr, pos, and prev.

Referenced by reset_first(), reset_last(), and TEST_F().

◆ reset_first()

void Aleph::HTList::Iterator::reset_first ( )
inlinenoexcept

Definition at line 891 of file htlist.H.

References reset().

Referenced by TEST().

◆ reset_last()

void Aleph::HTList::Iterator::reset_last ( )
inline

It has O(n) of performance.

Definition at line 894 of file htlist.H.

References curr, Aleph::HTList::is_empty(), lptr, NEXT, pos, prev, and reset().

Referenced by TEST().

Member Data Documentation

◆ curr

Slinknc* Aleph::HTList::Iterator::curr = nullptr
private

◆ lptr

HTList* Aleph::HTList::Iterator::lptr = nullptr
private

Definition at line 861 of file htlist.H.

Referenced by del_ne(), is_in_first(), is_last(), next_ne(), operator=(), reset(), and reset_last().

◆ pos

long Aleph::HTList::Iterator::pos = 0
private

Definition at line 865 of file htlist.H.

Referenced by get_pos(), next_ne(), operator=(), reset(), and reset_last().

◆ prev

Slinknc* Aleph::HTList::Iterator::prev = nullptr
private

Definition at line 863 of file htlist.H.

Referenced by del_ne(), next_ne(), operator=(), reset(), and reset_last().


The documentation for this class was generated from the following file: