|
Aleph-w 3.0
A C++ Library for Data Structures and Algorithms
|
Iterator over a GenLhashTable hash table. More...
#include <tpl_lhash.H>
Public Types | |
| using | Set_Type = GenLhashTable |
| Set type over which iteration occurs. | |
| using | Item_Type = Bucket * |
| Item type returned by get_curr(). | |
Public Member Functions | |
| Iterator (const GenLhashTable &table) noexcept | |
| Instantiate an iterator over the hash table. | |
| Iterator ()=default | |
| Instantiate an empty iterator. | |
| void | reset_first () noexcept |
| Reset the iterator to the first bucket. | |
| void | reset_last () noexcept |
| Reset the iterator to the last bucket. | |
| void | end () noexcept |
| bool | has_curr () const noexcept |
| Returns true if the iterator has a current bucket. | |
| Bucket * | get_curr_ne () noexcept |
| Returns the current bucket without exception. | |
| Bucket * | get_curr () |
| Returns the current bucket. | |
| long | get_pos () const noexcept |
| void | next_ne () noexcept |
| Advances the iterator by one bucket. | |
| void | next () |
| void | prev_ne () noexcept |
| Moves the iterator back by one bucket. | |
| void | prev () |
| Bucket * | del () |
Private Attributes | |
| long | curr_index = -1 |
| long | curr_pos = 0 |
| BucketItor | curr_itor |
| GenLhashTable * | hash_table = nullptr |
Iterator over a GenLhashTable hash table.
Definition at line 540 of file tpl_lhash.H.
| using Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::Item_Type = Bucket * |
Item type returned by get_curr().
Definition at line 677 of file tpl_lhash.H.
| using Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::Set_Type = GenLhashTable |
Set type over which iteration occurs.
Definition at line 674 of file tpl_lhash.H.
|
inlinenoexcept |
Instantiate an iterator over the hash table.
Definition at line 680 of file tpl_lhash.H.
References Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::locate_next_available_entry().
|
default |
Instantiate an empty iterator.
|
inline |
Definition at line 784 of file tpl_lhash.H.
References Aleph::divide_and_conquer_partition_dp(), Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::get_curr(), Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::hash_table, Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::next(), and Aleph::GenLhashTable< Key, BucketType, Cmp >::remove_bucket().
|
inlinenoexcept |
Definition at line 717 of file tpl_lhash.H.
References put_itor_at_the_end().
|
inline |
Returns the current bucket.
Definition at line 745 of file tpl_lhash.H.
References ah_overflow_error_if, ah_underflow_error_if, Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::curr_index, Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::curr_itor, Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::hash_table, and Aleph::GenLhashTable< Key, BucketType, Cmp >::len.
Referenced by Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::del().
|
inlinenoexcept |
Returns the current bucket without exception.
If has_curr() is true, returns a pointer to the current bucket. Otherwise, returns nullptr.
nullptr if there is no current bucket (i.e., has_curr() is false). Definition at line 736 of file tpl_lhash.H.
References Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::curr_itor, Aleph::divide_and_conquer_partition_dp(), and Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::has_curr().
|
inlinenoexcept |
Definition at line 756 of file tpl_lhash.H.
References Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::curr_pos.
|
inlinenoexcept |
Returns true if the iterator has a current bucket.
Definition at line 723 of file tpl_lhash.H.
References Aleph::and, Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::curr_index, Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::hash_table, and Aleph::GenLhashTable< Key, BucketType, Cmp >::len.
Referenced by Aleph::DynLhashTable< Key, Record, Cmp >::copy(), and Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::get_curr_ne().
|
inlineprivate |
Definition at line 601 of file tpl_lhash.H.
References Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::curr_itor, Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::curr_pos, Aleph::divide_and_conquer_partition_dp(), and Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::locate_next_available_entry().
|
inlineprivatenoexcept |
Definition at line 593 of file tpl_lhash.H.
References Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::curr_itor, Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::curr_pos, Aleph::divide_and_conquer_partition_dp(), and Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::locate_next_available_entry_ne().
Referenced by Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::next_ne().
|
inlineprivate |
Definition at line 569 of file tpl_lhash.H.
References ah_overflow_error_if, Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::curr_index, Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::curr_itor, Aleph::divide_and_conquer_partition_dp(), Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::hash_table, Aleph::Dlink::is_empty(), Aleph::GenLhashTable< Key, BucketType, Cmp >::len, and Aleph::GenLhashTable< Key, BucketType, Cmp >::table.
Referenced by Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::Iterator(), Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::locate_next_available_bucket(), and Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::reset_first().
|
inlineprivatenoexcept |
Definition at line 548 of file tpl_lhash.H.
References Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::curr_index, Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::curr_itor, Aleph::divide_and_conquer_partition_dp(), Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::hash_table, Aleph::Dlink::is_empty(), Aleph::GenLhashTable< Key, BucketType, Cmp >::len, and Aleph::GenLhashTable< Key, BucketType, Cmp >::table.
Referenced by Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::locate_next_available_bucket_ne().
|
inlineprivate |
Definition at line 664 of file tpl_lhash.H.
References Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::curr_itor, Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::curr_pos, Aleph::divide_and_conquer_partition_dp(), and Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::locate_prev_available_entry().
Referenced by Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::prev().
|
inlineprivatenoexcept |
Definition at line 656 of file tpl_lhash.H.
References Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::curr_itor, Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::curr_pos, Aleph::divide_and_conquer_partition_dp(), and Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::locate_prev_available_entry_ne().
Referenced by Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::prev_ne().
|
inlineprivate |
Definition at line 631 of file tpl_lhash.H.
References ah_underflow_error_if, Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::curr_index, Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::curr_itor, Aleph::divide_and_conquer_partition_dp(), Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::hash_table, Aleph::Dlink::is_empty(), and Aleph::GenLhashTable< Key, BucketType, Cmp >::table.
Referenced by Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::locate_prev_available_bucket(), and Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::reset_last().
|
inlineprivatenoexcept |
Definition at line 609 of file tpl_lhash.H.
References Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::curr_index, Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::curr_itor, Aleph::divide_and_conquer_partition_dp(), Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::hash_table, Aleph::Dlink::is_empty(), and Aleph::GenLhashTable< Key, BucketType, Cmp >::table.
Referenced by Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::locate_prev_available_bucket_ne().
|
inline |
Definition at line 764 of file tpl_lhash.H.
References ah_overflow_error_if, Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::curr_index, Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::hash_table, Aleph::GenLhashTable< Key, BucketType, Cmp >::len, and Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::next_ne().
Referenced by Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::del().
|
inlinenoexcept |
Advances the iterator by one bucket.
Definition at line 759 of file tpl_lhash.H.
References Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::locate_next_available_bucket_ne().
Referenced by Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::next().
|
inline |
Definition at line 777 of file tpl_lhash.H.
References ah_underflow_error_if, Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::curr_index, and Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::locate_prev_available_bucket().
|
inlinenoexcept |
Moves the iterator back by one bucket.
Definition at line 772 of file tpl_lhash.H.
References Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::locate_prev_available_bucket_ne().
|
inlinenoexcept |
Reset the iterator to the first bucket.
Definition at line 696 of file tpl_lhash.H.
References Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::curr_index, Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::curr_pos, and Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::locate_next_available_entry().
|
inlinenoexcept |
Reset the iterator to the last bucket.
Definition at line 704 of file tpl_lhash.H.
References Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::curr_index, Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::curr_pos, Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::hash_table, Aleph::GenLhashTable< Key, BucketType, Cmp >::is_empty(), Aleph::GenLhashTable< Key, BucketType, Cmp >::len, Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::locate_prev_available_entry(), and Aleph::GenLhashTable< Key, BucketType, Cmp >::N.
|
private |
Definition at line 542 of file tpl_lhash.H.
Referenced by Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::get_curr(), Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::has_curr(), Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::locate_next_available_entry(), Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::locate_next_available_entry_ne(), Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::locate_prev_available_entry(), Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::locate_prev_available_entry_ne(), Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::next(), Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::prev(), Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::reset_first(), and Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::reset_last().
|
private |
Definition at line 544 of file tpl_lhash.H.
Referenced by Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::get_curr(), Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::get_curr_ne(), Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::locate_next_available_bucket(), Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::locate_next_available_bucket_ne(), Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::locate_next_available_entry(), Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::locate_next_available_entry_ne(), Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::locate_prev_available_bucket(), Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::locate_prev_available_bucket_ne(), Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::locate_prev_available_entry(), and Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::locate_prev_available_entry_ne().
|
private |
Definition at line 543 of file tpl_lhash.H.
Referenced by Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::get_pos(), Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::locate_next_available_bucket(), Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::locate_next_available_bucket_ne(), Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::locate_prev_available_bucket(), Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::locate_prev_available_bucket_ne(), Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::reset_first(), and Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::reset_last().
|
private |
Definition at line 545 of file tpl_lhash.H.
Referenced by Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::del(), Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::get_curr(), Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::has_curr(), Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::locate_next_available_entry(), Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::locate_next_available_entry_ne(), Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::locate_prev_available_entry(), Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::locate_prev_available_entry_ne(), Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::next(), and Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::reset_last().