Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
tpl_lhash.H
Go to the documentation of this file.
2/*
3 Aleph_w
4
5 Data structures & Algorithms
6 version 2.0.0b
7 https://github.com/lrleon/Aleph-w
8
9 This file is part of Aleph-w library
10
11 Copyright (c) 2002-2026 Leandro Rabindranath Leon
12
13 Permission is hereby granted, free of charge, to any person obtaining a copy
14 of this software and associated documentation files (the "Software"), to deal
15 in the Software without restriction, including without limitation the rights
16 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
17 copies of the Software, and to permit persons to whom the Software is
18 furnished to do so, subject to the following conditions:
19
20 The above copyright notice and this permission notice shall be included in all
21 copies or substantial portions of the Software.
22
23 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
24 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
25 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
26 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
27 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
28 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
29 SOFTWARE.
30*/
31
32
132# ifndef TPL_LHASH_H
133# define TPL_LHASH_H
134
135# include <iostream>
136# include <new>
137# include <primes.H>
138# include <dlink.H>
139# include <htlist.H>
140# include <tpl_dynArray.H>
141# include <hashDry.H>
142# include <hash-fct.H>
143# include <tpl_dynArray.H>
144# include <hash-dry.H>
145# include <ah-errors.H>
146# include <ah-concepts.H>
147
148# ifdef N
149# define NBACKUP N
150# undef N
151# endif
152
153# ifdef M
154# define MBACKUP M
155# undef M
156# endif
157
158using namespace Primes;
159
160using namespace Aleph;
161
162namespace Aleph
163{
181 template <typename Key, class BucketType, class Cmp>
183 class GenLhashTable : public HashStats<GenLhashTable<Key, BucketType, Cmp>>
184 {
185 friend class HashStats<GenLhashTable<Key, BucketType, Cmp>>;
186
187 public:
188 using Bucket = BucketType;
189
190 using Hash_Fct = std::function<size_t(const Key &)>;
191
192 using Hash_Fct_Ptr = size_t (*)(const Key &);
193
194 using Key_Type = Key;
195
196 using Item_Type = Key;
197
198 protected:
200
201 private:
202 using BucketList = Dlink; // Bucket list type
203 using BucketItor = typename Dnode<Key>::Iterator; // Bucket iterator
204 using Node = Dnode<Key>; // Node alias
205
207
208 protected:
209 size_t len; // Table size
213
214 private:
215 size_t N; // Number of elements in the table
216 size_t busy_slots_counter; // Number of occupied entries
217 bool remove_all_buckets; // free buckets in destructor
219
220 public:
221 Cmp &get_compare() { return cmp; }
222
223 const Cmp &get_compare() const { return cmp; }
224
225 protected:
226 GenLhashTable(const size_t table_size, Hash_Fct hash_f, Cmp cpm_fct,
227 const float lower, const float upper,
228 const bool remove_all, const bool resize)
229 : hash_fct(hash_f), table(nullptr),
230 len(hash_dry_detail::prime_table_len<BucketList>(table_size)), cmp(cpm_fct),
231 lower_alpha(lower), upper_alpha(upper),
232 N(0), busy_slots_counter(0), remove_all_buckets(remove_all),
234 {
235 table = new BucketList [len];
236 }
237
238 public:
255 Hash_Fct_Ptr hash_fct = Aleph::dft_hash_ptr_fct<Key>,
256 Cmp cmp = Cmp(),
259 bool remove_all_buckets = true,
260 bool with_resize = true)
261 : GenLhashTable(table_size, Hash_Fct(hash_fct), cmp,
263 {}
264
276 void swap(GenLhashTable & other) noexcept
277 {
278 std::swap(hash_fct, other.hash_fct);
279 std::swap(table, other.table);
280 std::swap(len, other.len);
282 std::swap(lower_alpha, other.lower_alpha);
283 std::swap(upper_alpha, other.upper_alpha);
284 std::swap(N, other.N);
285 std::swap(busy_slots_counter, other.busy_slots_counter);
286 std::swap(remove_all_buckets, other.remove_all_buckets);
287 std::swap(with_resize, other.with_resize);
288 }
289
290 GenLhashTable(const GenLhashTable &) = delete;
291
293
311 GenLhashTable(GenLhashTable && other) noexcept
312 : hash_fct(other.hash_fct),
313 table(other.table),
314 len(other.len),
315 cmp(other.cmp),
316 lower_alpha(other.lower_alpha),
317 upper_alpha(other.upper_alpha),
318 N(other.N),
319 busy_slots_counter(other.busy_slots_counter),
320 remove_all_buckets(other.remove_all_buckets),
321 with_resize(other.with_resize)
322 {
323 other.table = nullptr;
324 other.len = 0;
325 other.N = 0;
326 other.busy_slots_counter = 0;
327 }
328
342 {
343 if (this != &other)
344 {
345 if (remove_all_buckets && table != nullptr)
346 empty();
347 delete [] table;
348
349 // this table is now one without lists, as a move leaves one;
350 // the swap gives it what other has, and other what rules it
351 table = nullptr;
352 len = 0;
353 N = 0;
355 swap(other);
356 }
357 return *this;
358 }
359
361 void empty() noexcept
362 {
363 for (size_t i = 0; i < len; ++i)
364 for (BucketItor itor(table[i]); itor.has_curr(); /* nothing */)
365 delete static_cast<Bucket *>(itor.del_ne());
366 busy_slots_counter = N = 0;
367 }
368
374 void clear() noexcept { empty(); }
375
382 bool contains(const Key & key) const noexcept { return search(key) != nullptr; }
383
384 private:
385 Bucket *
386 search_in_bucket_list(BucketList & list, const Key & key) const
387 {
388 for (BucketItor it(list); it.has_curr(); it.next_ne())
389 if (auto *bucket = static_cast<Bucket *>(it.get_curr()); cmp(key, bucket->get_key()))
390 return bucket;
391
392 return nullptr;
393 }
394
395 protected:
418 template <typename HashFunc, typename SearchKey>
419 Bucket * search_with_custom_hash(HashFunc hash_func,
420 const SearchKey & search_key) const noexcept
421 {
422 if (len == 0) [[unlikely]] // a table that a move left without lists
423 return nullptr;
424
425 const auto bucket_idx = hash_func(search_key) % len;
426
427 for (BucketItor it(table[bucket_idx]); it.has_curr(); it.next_ne())
428 if (auto *bucket = static_cast<Bucket *>(it.get_curr());
429 cmp(bucket->get_key(), search_key))
430 return bucket;
431
432 return nullptr;
433 }
434
435 public:
436 Hash_Fct get_hash_fct() const noexcept { return hash_fct; }
437
455 {
456 Hash_Fct old = std::move(hash_fct);
457 hash_fct = std::move(fct);
458 if (N == 0)
459 return;
460
461 try
462 {
463 resize(len); // it allocates the new lists before it moves a bucket
464 }
465 catch (...)
466 {
467 hash_fct = std::move(old);
468 throw;
469 }
470 }
471
474 {
476 }
477
479 float current_alpha() const noexcept { return len == 0 ? 0.0f : load(); }
480
481 private:
482 // The load of a table that has lists
483 float load() const noexcept { return 1.0 * N / len; }
484
485 // The lists of the default capacity, for a table that a move left
486 // without them and that a bucket is about to enter
487 [[gnu::cold, gnu::noinline]] void make_default_lists()
488 {
489 const size_t default_len = Primes::next_prime(Primes::DefaultPrime);
490 table = new BucketList [default_len];
491 len = default_len;
492 }
493
494 public:
495
504 {
505 if (table == nullptr) [[unlikely]]
507
508 const auto i = hash_fct(bucket->get_key()) % len;
509 auto & list = table[i];
510
511 if (list.is_empty()) // is table[i] list empty?
512 ++busy_slots_counter; // yes ==> update occupied counter
513
514 if (search_in_bucket_list(list, bucket->get_key()) != nullptr)
515 return nullptr;
516
517 list.append(bucket); // insert bucket at the end
518 ++N;
519
521 resize(next_prime(2 * len));
522
523 return bucket;
524 }
525
526 // Search bucket->key. If found, returns the bucket address inside the table.
527 // Otherwise, inserts and returns bucket. It throws std::bad_alloc as
528 // insert() does, with the bucket out of the table or in it
530 {
531 if (table == nullptr) [[unlikely]]
533
534 const auto i = hash_fct(bucket->get_key()) % len;
535 auto & list = table[i];
536
537 if (list.is_empty()) // is table[i] list empty?
538 ++busy_slots_counter; // yes ==> update occupied counter
539
540 auto *p = search_in_bucket_list(list, bucket->get_key());
541 if (p != nullptr)
542 return p;
543
544 list.append(bucket); // insert bucket at the end
545 ++N;
546
548 resize(next_prime(2 * len));
549
550 return bucket;
551 }
552
555 Bucket * search(const Key & key) const noexcept
556 {
557 if (len == 0) [[unlikely]] // a table that a move left without lists
558 return nullptr;
559
560 const auto i = hash_fct(key) % len;
561 return search_in_bucket_list(table[i], key);
562 }
563
564 private:
565 // Remove without perform resizing. This is strictly required inside
566 // the del() method of Iterator. In addition, dries the code
567 Bucket * remove_bucket(Bucket *bucket) noexcept
568 {
569 const auto idx = hash_fct(bucket->get_key()) % len;
570 bucket->del(); // remove from its collision list
571
572 if (table[idx].is_empty()) // did the list become empty?
573 --busy_slots_counter; // yes ==> update occupied lists counter
574
575 --N;
576
577 return bucket;
578 }
579
580 public:
587 Bucket * remove(Bucket *bucket) noexcept
588 { // save next collision
589 remove_bucket(bucket);
590
591 // next_prime() gives a prime of its table, so half of 211 is 211;
592 // over the upper threshold, resize() would grow the table again
594 if (const size_t new_len = next_prime(len / 2);
595 new_len < len and 1.0f*N/new_len < upper_alpha)
596 try
597 {
598 resize(new_len);
599 }
600 catch (const std::bad_alloc &)
601 {
602 // resize() allocates the new lists before it touches the table
603 }
604
605 return bucket;
606 }
607
627 size_t resize(const size_t new_size)
628 {
629 if (new_size == 0)
630 return len;
631
632 // the load factor as current_alpha() computes it, which insert()
633 // compares with upper_alpha: below it with size lists, none of the
634 // insertions below grows the table
635 // The size is checked before it grows, and each time that it does:
636 // one that no table has is refused at once, and twice a size that
637 // a table has is a size_t
638 size_t size = hash_dry_detail::checked_table_len<BucketList>(new_size);
640 while (static_cast<float>(1.0 * N / size) >= upper_alpha)
641 size = hash_dry_detail::prime_table_len<BucketList>(2 * size);
642
643 auto *new_table = new BucketList [size];
644 BucketList *old_table = table; // save current table state
645 const size_t old_size = len;
646 table = new_table; // empty table with new array
647 len = size;
648 busy_slots_counter = N = 0;
649
650 for (size_t i = 0; i < old_size; ++i) // reinsert buckets
651 // traverse collision list in old_table[i]
652 for (BucketItor it(old_table[i]); it.has_curr(); /* Nothing */)
653 insert(static_cast<Bucket *>(it.del_ne())); // remove and insert into table[]
654
655 delete [] old_table; // free old table memory
656
657 return len;
658 }
659
663 {
665 empty();
666
667 delete [] table;
668 }
669
672 Bucket * search_next(Bucket *bucket) const
673 {
674 assert(bucket != nullptr);
675
676 const auto i = hash_fct(bucket->get_key()) % len;
677
678 BucketItor itor(table[i]);
679 itor.set(bucket);
680
681 while (true)
682 {
683 itor.next_ne();
684
685 if (not itor.has_curr())
686 return nullptr;
687
688 if (auto *node = static_cast<Bucket *>(itor.get_curr()); cmp(bucket->get_key(), node->get_key()))
689 return node;
690 }
691 }
692
694 const size_t &capacity() const noexcept { return len; }
695
697 const size_t &size() const noexcept { return N; }
698
700 const size_t &
701 get_num_busy_slots() const noexcept { return busy_slots_counter; }
702
703 [[nodiscard]] constexpr bool is_empty() const noexcept { return N == 0; }
704
711 {
712 long curr_index = -1; // index in table
713 long curr_pos = 0;
714 BucketItor curr_itor; // Iterator over table[curr_index]
716
717 // Advance to the next available entry in table
719 {
720 while (true)
721 {
722 if (curr_index == hash_table->len - 1)
723 { // remain in overflow state
725 return;
726 }
727
728 ++curr_index;
729
731 {
733 curr_itor = itor;
734 return;
735 }
736 }
737 }
738
740 {
741 while (true)
742 {
744 << "hash table iterator overflow";
745
746 if (curr_index == hash_table->len - 1)
747 { // remain in overflow state
749 return;
750 }
751
752 ++curr_index;
753
755 {
757 curr_itor = itor;
758 return;
759 }
760 }
761 }
762
764 {
765 curr_itor.next_ne();
766 if (not curr_itor.has_curr())
768 curr_pos++;
769 }
770
772 {
773 curr_itor.next();
774 if (not curr_itor.has_curr())
776 curr_pos++;
777 }
778
780 {
781 while (true)
782 {
783 if (curr_index == 0)
784 { // remain in underflow state
785 curr_index = -1;
786 return;
787 }
788
789 --curr_index;
790
792 {
794 curr_itor = itor;
795 curr_itor.reset_last();
796 return;
797 }
798 }
799 }
800
802 {
803 while (true)
804 {
806 << "hash table iterator underflow";
807
808 if (curr_index == 0)
809 { // remain in underflow state
810 curr_index = -1;
811 return;
812 }
813
814 --curr_index;
815
817 {
819 curr_itor = itor;
820 curr_itor.reset_last();
821 return;
822 }
823 }
824 }
825
827 {
828 curr_itor.prev_ne();
829 if (not curr_itor.has_curr())
831 curr_pos--;
832 }
833
835 {
836 curr_itor.prev();
837 if (not curr_itor.has_curr())
839 curr_pos--;
840 }
841
842 public:
845
847 using Item_Type = Bucket *;
848
850 Iterator(const GenLhashTable & table) noexcept
851 : hash_table(&const_cast<GenLhashTable &>(table))
852 {
853 try
854 {
856 }
857 catch (const std::overflow_error &)
858 { /* nothing to do */
859 }
860 }
861
863 Iterator() = default;
864
866 void reset_first() noexcept
867 {
868 curr_index = -1;
869 curr_pos = 0;
871 }
872
874 void reset_last() noexcept
875 {
876 if (hash_table->is_empty())
877 {
878 curr_index = -1;
879 curr_pos = -1;
880 return;
881 }
883 curr_pos = static_cast<long>(hash_table->N) - 1;
885 }
886
887 void end() noexcept
888 {
889 put_itor_at_the_end(*this);
890 }
891
893 bool has_curr() const noexcept
894 {
895 return curr_index >= 0 and curr_index < hash_table->len;
896 }
897
906 Bucket * get_curr_ne() noexcept
907 {
908 if (not has_curr())
909 return nullptr;
910
911 return static_cast<Bucket *>(curr_itor.get_curr_ne());
912 }
913
916 {
918 << "hash table iterator underflow";
919
921 << "hash table iterator overflow";
922
923 return static_cast<Bucket *>(curr_itor.get_curr());
924 }
925
926 long get_pos() const noexcept { return curr_pos; }
927
929 void next_ne() noexcept
930 {
932 }
933
934 void next()
935 {
937 << "hash table iterator overflow";
938 next_ne();
939 }
940
942 void prev_ne() noexcept
943 {
945 }
946
947 void prev()
948 {
950 << "hash table iterator underflow";
952 }
953
955 {
956 Bucket *ret_val = get_curr();
957 next();
958 hash_table->remove_bucket(ret_val);
959 return ret_val;
960 }
961 };
962 };
963
971 template <typename Key>
973
974
982 template <typename Key>
983 struct LhashBucketVtl : public Dnode<Key>
984 {
986 using Base::Base;
987
989 virtual ~LhashBucketVtl() = default;
990 };
991
1005 template <typename Key, class Cmp = Aleph::equal_to<Key>>
1007 struct LhashTable : public GenLhashTable<Key, LhashBucket<Key>, Cmp>
1008 {
1010 using Base::Base;
1011 };
1012
1025 template <typename Key, class Cmp = Aleph::equal_to<Key>>
1027 struct LhashTableVtl : public GenLhashTable<Key, LhashBucketVtl<Key>, Cmp>
1028 {
1030 using Base::Base;
1031 };
1032} // end namespace Aleph
1033
1034# ifdef NBACKUP
1035# define N NBACKUP
1036# undef NBACKUP
1037# endif
1038
1039# ifdef MBACKUP
1040# define M MBACKUP
1041# undef MBACKUP
1042# endif
1043
1044# endif/* TPL_LHASH_H */
C++20 concepts hub: comparison, BST policy, and Aleph container concepts.
Exception handling system with formatted messages for Aleph-w.
#define ah_underflow_error_if(C)
Throws std::underflow_error if condition holds.
Definition ah-errors.H:517
#define ah_overflow_error_if(C)
Throws std::overflow_error if condition holds.
Definition ah-errors.H:611
void put_itor_at_the_end(Itor &it) noexcept
Definition aleph.H:54
Iterator on a list of Dnode objects.
Definition tpl_dnode.H:294
Iterator over a GenLhashTable hash table.
Definition tpl_lhash.H:711
void reset_last() noexcept
Reset the iterator to the last bucket.
Definition tpl_lhash.H:874
void reset_first() noexcept
Reset the iterator to the first bucket.
Definition tpl_lhash.H:866
Iterator()=default
Instantiate an empty iterator.
Bucket * get_curr()
Returns the current bucket.
Definition tpl_lhash.H:915
void locate_next_available_bucket_ne() noexcept
Definition tpl_lhash.H:763
void locate_prev_available_bucket_ne() noexcept
Definition tpl_lhash.H:826
void locate_next_available_entry_ne() noexcept
Definition tpl_lhash.H:718
void prev_ne() noexcept
Moves the iterator back by one bucket.
Definition tpl_lhash.H:942
Bucket * Item_Type
Item type returned by get_curr().
Definition tpl_lhash.H:847
void next_ne() noexcept
Advances the iterator by one bucket.
Definition tpl_lhash.H:929
Bucket * get_curr_ne() noexcept
Returns the current bucket without exception.
Definition tpl_lhash.H:906
Iterator(const GenLhashTable &table) noexcept
Instantiate an iterator over the hash table.
Definition tpl_lhash.H:850
void locate_prev_available_entry_ne() noexcept
Definition tpl_lhash.H:779
bool has_curr() const noexcept
Returns true if the iterator has a current bucket.
Definition tpl_lhash.H:893
long get_pos() const noexcept
Definition tpl_lhash.H:926
Generic hash table with collision resolution by separate chaining.
Definition tpl_lhash.H:184
void set_hash_fct(Hash_Fct_Ptr fct)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition tpl_lhash.H:473
Bucket * remove(Bucket *bucket) noexcept
Removes bucket from the table.
Definition tpl_lhash.H:587
GenLhashTable & operator=(const GenLhashTable &)=delete
Bucket * insert(Bucket *bucket)
Inserts bucket into the table and returns its address if the key is not already in the table; otherwi...
Definition tpl_lhash.H:503
Hash_Fct get_hash_fct() const noexcept
Definition tpl_lhash.H:436
bool contains(const Key &key) const noexcept
Checks if a key exists in the table.
Definition tpl_lhash.H:382
size_t(*)(const Key &) Hash_Fct_Ptr
Definition tpl_lhash.H:192
GenLhashTable(GenLhashTable &&other) noexcept
Takes the lists and the buckets of other.
Definition tpl_lhash.H:311
Bucket * search_in_bucket_list(BucketList &list, const Key &key) const
Definition tpl_lhash.H:386
void clear() noexcept
Empties the container.
Definition tpl_lhash.H:374
typename Dnode< Key >::Iterator BucketItor
Definition tpl_lhash.H:203
const size_t & get_num_busy_slots() const noexcept
Returns the number of occupied entries in the array.
Definition tpl_lhash.H:701
void empty() noexcept
Empties the hash table; frees memory of all buckets.
Definition tpl_lhash.H:361
const Cmp & get_compare() const
Definition tpl_lhash.H:223
float current_alpha() const noexcept
return the current table load; zero for a table without lists
Definition tpl_lhash.H:479
Bucket * remove_bucket(Bucket *bucket) noexcept
Definition tpl_lhash.H:567
const size_t & size() const noexcept
Returns the number of elements contained in the table.
Definition tpl_lhash.H:697
GenLhashTable(size_t table_size=Primes::DefaultPrime, Hash_Fct_Ptr hash_fct=Aleph::dft_hash_ptr_fct< Key >, Cmp cmp=Cmp(), float lower_alpha=hash_default_lower_alpha, float upper_alpha=hash_default_upper_alpha, bool remove_all_buckets=true, bool with_resize=true)
Instantiate a generic hash table.
Definition tpl_lhash.H:254
Bucket * search_or_insert(Bucket *bucket)
Definition tpl_lhash.H:529
virtual ~GenLhashTable()
Frees the table memory and, if remove_all_buckets is true (specified in the constructor),...
Definition tpl_lhash.H:662
const size_t & capacity() const noexcept
Returns the table capacity.
Definition tpl_lhash.H:694
std::function< size_t(const Key &)> Hash_Fct
Definition tpl_lhash.H:190
void swap(GenLhashTable &other) noexcept
Swaps this table with other in constant time.
Definition tpl_lhash.H:276
GenLhashTable(const GenLhashTable &)=delete
GenLhashTable(const size_t table_size, Hash_Fct hash_f, Cmp cpm_fct, const float lower, const float upper, const bool remove_all, const bool resize)
Definition tpl_lhash.H:226
Bucket * search_next(Bucket *bucket) const
Returns the next bucket that collides with bucket.
Definition tpl_lhash.H:672
float load() const noexcept
Definition tpl_lhash.H:483
Bucket * search(const Key &key) const noexcept
Search in the table for a bucket with key.
Definition tpl_lhash.H:555
void set_hash_fct(Hash_Fct fct)
Sets the hash function.
Definition tpl_lhash.H:454
constexpr bool is_empty() const noexcept
Definition tpl_lhash.H:703
GenLhashTable & operator=(GenLhashTable &&other) noexcept
Frees the buckets and the lists of this table, and takes those of other, with what rules them: the ha...
Definition tpl_lhash.H:341
BucketList * table
Definition tpl_lhash.H:206
Bucket * search_with_custom_hash(HashFunc hash_func, const SearchKey &search_key) const noexcept
Helper method for derived classes to perform custom heterogeneous searches.
Definition tpl_lhash.H:419
size_t resize(const size_t new_size)
Resizes the table to new_size lists and places every bucket again.
Definition tpl_lhash.H:627
Number Theoretic Transform over Z / MOD Z.
Definition ntt.H:115
CRTP mixin providing statistics and configuration for chained hash tables.
Definition hashDry.H:1392
Equivalence relation constraint for equality comparators.
void swap_compare(Cmp &a, Cmp &b) noexcept
Swaps the comparators of two hash tables.
Definition hashDry.H:1357
Common hash table utilities and base classes.
Standard hash functions for Aleph types.
Common operations for open addressing hash tables (CRTP mixin).
Singly linked list implementations with head-tail access.
Table::Bucket Bucket
Definition lin-hash.cc:57
Main namespace for Aleph-w library functions.
const float hash_default_upper_alpha
Definition hash-dry.C:40
and
Check uniqueness with explicit hash + equality functors.
const float hash_default_lower_alpha
Definition hash-dry.C:38
const unsigned long DefaultPrime
Default prime number used when no specific size is requested.
Definition primes.C:381
unsigned long next_prime(unsigned long n)
Find a prime >= n in the database, for hash table sizing.
Definition primes.C:383
Prime number utilities for hash tables and mathematical operations.
Bucket with virtual destructor for a hash table with collision resolution by separate chaining.
Definition tpl_lhash.H:984
virtual ~LhashBucketVtl()=default
Virtual destructor.
Generic hash table with collision resolution by separate chaining and buckets with virtual destructor...
Definition tpl_lhash.H:1028
Generic hash table with collision resolution by separate chaining and buckets without virtual destruc...
Definition tpl_lhash.H:1008
Lazy and scalable dynamic array implementation.