Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
Loading...
Searching...
No Matches
Aleph::GenLhashTable< Key, BucketType, Cmp > Class Template Reference

Generic hash table with collision resolution by separate chaining. More...

#include <tpl_lhash.H>

Inheritance diagram for Aleph::GenLhashTable< Key, BucketType, Cmp >:
[legend]
Collaboration diagram for Aleph::GenLhashTable< Key, BucketType, Cmp >:
[legend]

Classes

class  Iterator
 Iterator over a GenLhashTable hash table. More...
 

Public Types

using Bucket = BucketType
 
using Hash_Fct = std::function< size_t(const Key &)>
 
using Hash_Fct_Ptr = size_t(*)(const Key &)
 
using Key_Type = Key
 
using Item_Type = Key
 

Public Member Functions

Cmp & get_compare ()
 
const Cmp & get_compare () const
 
 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.
 
void swap (GenLhashTable &other) noexcept
 Swaps this table with other in constant time.
 
 GenLhashTable (const GenLhashTable &)=delete
 
GenLhashTable & operator= (const GenLhashTable &)=delete
 
 GenLhashTable (GenLhashTable &&other) noexcept
 Takes the lists and the buckets of other.
 
GenLhashTable & operator= (GenLhashTable &&other) noexcept
 Frees the buckets and the lists of this table, and takes those of other, with what rules them: the hash function, the comparator, the load thresholds and the policies.
 
void empty () noexcept
 Empties the hash table; frees memory of all buckets.
 
void clear () noexcept
 Empties the container.
 
bool contains (const Key &key) const noexcept
 Checks if a key exists in the table.
 
Hash_Fct get_hash_fct () const noexcept
 
void set_hash_fct (Hash_Fct fct)
 Sets the hash function.
 
void set_hash_fct (Hash_Fct_Ptr fct)
 This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
 
float current_alpha () const noexcept
 return the current table load; zero for a table without lists
 
Bucket * insert (Bucket *bucket)
 Inserts bucket into the table and returns its address if the key is not already in the table; otherwise returns nullptr.
 
Bucket * search_or_insert (Bucket *bucket)
 
Bucket * search (const Key &key) const noexcept
 Search in the table for a bucket with key.
 
Bucket * remove (Bucket *bucket) noexcept
 Removes bucket from the table.
 
size_t resize (const size_t new_size)
 Resizes the table to new_size lists and places every bucket again.
 
virtual ~GenLhashTable ()
 Frees the table memory and, if remove_all_buckets is true (specified in the constructor), also frees memory of all buckets.
 
Bucket * search_next (Bucket *bucket) const
 Returns the next bucket that collides with bucket.
 
const size_t & capacity () const noexcept
 Returns the table capacity.
 
const size_t & size () const noexcept
 Returns the number of elements contained in the table.
 
const size_t & get_num_busy_slots () const noexcept
 Returns the number of occupied entries in the array.
 
constexpr bool is_empty () const noexcept
 
- Public Member Functions inherited from HashStats< GenLhashTable< Key, BucketType, Cmp > >
Stats stats () const
 Computes statistics about chain length distribution.
 
void print_stats (const Stats &stats) const
 Prints statistics to standard output.
 
void set_upper_alpha (float _upper_alpha)
 Sets the upper load factor threshold.
 
void set_lower_alpha (float _lower_alpha)
 Sets the lower load factor threshold.
 
constexpr float get_lower_alpha () const noexcept
 Returns the lower load factor threshold.
 
constexpr float get_upper_alpha () const noexcept
 Returns the upper load factor threshold.
 
constexpr bool get_with_resize () const noexcept
 Returns whether the table resizes itself.
 
void set_with_resize (const bool with_resize) noexcept
 Turns the automatic resizing on or off.
 

Protected Member Functions

 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)
 
template<typename HashFunc , typename SearchKey >
Bucket * search_with_custom_hash (HashFunc hash_func, const SearchKey &search_key) const noexcept
 Helper method for derived classes to perform custom heterogeneous searches.
 

Protected Attributes

Hash_Fct hash_fct
 
size_t len
 
Cmp cmp
 
float lower_alpha
 
float upper_alpha
 

Private Types

using BucketList = Dlink
 
using BucketItor = typename Dnode< Key >::Iterator
 
using Node = Dnode< Key >
 

Private Member Functions

Bucket * search_in_bucket_list (BucketList &list, const Key &key) const
 
float load () const noexcept
 
void make_default_lists ()
 
Bucket * remove_bucket (Bucket *bucket) noexcept
 

Private Attributes

BucketList * table
 
size_t N
 
size_t busy_slots_counter
 
bool remove_all_buckets
 
bool with_resize
 

Friends

class HashStats< GenLhashTable< Key, BucketType, Cmp > >
 

Detailed Description

template<typename Key, class BucketType, class Cmp>
requires EqualityComparator<Cmp, Key>
class Aleph::GenLhashTable< Key, BucketType, Cmp >

Generic hash table with collision resolution by separate chaining.

The GenLhashTable type implements a generic hash table with collision resolution by separate chaining, where the bucket type is a type parameter.

Normally, this is intended as the back-end of the LhashTable and LhashTableVtl types, which are fundamentally the same, except that they already define their bucket classes without or with a virtual destructor.

Parameters
Keyindexing key type of the table.
BucketTypebucket type.
Cmpkey comparison class.
See also
LhashTable LhashTableVtl

Definition at line 183 of file tpl_lhash.H.

Member Typedef Documentation

◆ Bucket

template<typename Key , class BucketType , class Cmp >
using Aleph::GenLhashTable< Key, BucketType, Cmp >::Bucket = BucketType

Definition at line 188 of file tpl_lhash.H.

◆ BucketItor

template<typename Key , class BucketType , class Cmp >
using Aleph::GenLhashTable< Key, BucketType, Cmp >::BucketItor = typename Dnode<Key>::Iterator
private

Definition at line 203 of file tpl_lhash.H.

◆ BucketList

template<typename Key , class BucketType , class Cmp >
using Aleph::GenLhashTable< Key, BucketType, Cmp >::BucketList = Dlink
private

Definition at line 202 of file tpl_lhash.H.

◆ Hash_Fct

template<typename Key , class BucketType , class Cmp >
using Aleph::GenLhashTable< Key, BucketType, Cmp >::Hash_Fct = std::function<size_t(const Key &)>

Definition at line 190 of file tpl_lhash.H.

◆ Hash_Fct_Ptr

template<typename Key , class BucketType , class Cmp >
using Aleph::GenLhashTable< Key, BucketType, Cmp >::Hash_Fct_Ptr = size_t (*)(const Key &)

Definition at line 192 of file tpl_lhash.H.

◆ Item_Type

template<typename Key , class BucketType , class Cmp >
using Aleph::GenLhashTable< Key, BucketType, Cmp >::Item_Type = Key

Definition at line 196 of file tpl_lhash.H.

◆ Key_Type

template<typename Key , class BucketType , class Cmp >
using Aleph::GenLhashTable< Key, BucketType, Cmp >::Key_Type = Key

Definition at line 194 of file tpl_lhash.H.

◆ Node

template<typename Key , class BucketType , class Cmp >
using Aleph::GenLhashTable< Key, BucketType, Cmp >::Node = Dnode<Key>
private

Definition at line 204 of file tpl_lhash.H.

Constructor & Destructor Documentation

◆ GenLhashTable() [1/4]

template<typename Key , class BucketType , class Cmp >
Aleph::GenLhashTable< Key, BucketType, Cmp >::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 
)
inlineprotected

◆ GenLhashTable() [2/4]

template<typename Key , class BucketType , class Cmp >
Aleph::GenLhashTable< Key, BucketType, Cmp >::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 
)
inline

Instantiate a generic hash table.

Parameters
[in]hash_fcthash function.
cmpkey comparison functor.
[in]lower_alphalower load factor.
[in]upper_alphaupper load factor.
[in]table_sizetable size.
[in]remove_all_bucketsif true, then all buckets are freed when the destructor is invoked.
with_resizeif true, the table is resized when the load factor exceeds upper_alpha.
Exceptions
overflow_errorif the bytes of table_size lists do not fit in a size_t.
bad_allocif there is not enough memory to allocate the table.

Definition at line 254 of file tpl_lhash.H.

◆ GenLhashTable() [3/4]

template<typename Key , class BucketType , class Cmp >
Aleph::GenLhashTable< Key, BucketType, Cmp >::GenLhashTable ( const GenLhashTable< Key, BucketType, Cmp > &  )
delete

◆ GenLhashTable() [4/4]

template<typename Key , class BucketType , class Cmp >
Aleph::GenLhashTable< Key, BucketType, Cmp >::GenLhashTable ( GenLhashTable< Key, BucketType, Cmp > &&  other)
inlinenoexcept

Takes the lists and the buckets of other.

Parameters
[in,out]otherTable to take the buckets from. It is left empty and without lists, with capacity zero. It is still usable: the first insertion gives it the lists of the default capacity.
Note
Only the hash function and the comparator are copied, so that other keeps them: a table that took keys again with another hash function, or with another comparator, than the one that it was built with would not find them. If copying one of them throws, std::terminate is called. A function pointer and a comparator without state never throw. The copy of a hash function allocates when what it holds does not fit in the buffer of a std::function, as a function object with more state than a pointer or two: without memory for it, the program ends. The move assignment copies nothing but a comparator that cannot be moved.

Definition at line 311 of file tpl_lhash.H.

◆ ~GenLhashTable()

template<typename Key , class BucketType , class Cmp >
virtual Aleph::GenLhashTable< Key, BucketType, Cmp >::~GenLhashTable ( )
inlinevirtual

Frees the table memory and, if remove_all_buckets is true (specified in the constructor), also frees memory of all buckets.

Definition at line 662 of file tpl_lhash.H.

References Aleph::GenLhashTable< Key, BucketType, Cmp >::empty(), Aleph::GenLhashTable< Key, BucketType, Cmp >::remove_all_buckets, and Aleph::GenLhashTable< Key, BucketType, Cmp >::table.

Member Function Documentation

◆ capacity()

template<typename Key , class BucketType , class Cmp >
const size_t & Aleph::GenLhashTable< Key, BucketType, Cmp >::capacity ( ) const
inlinenoexcept

Returns the table capacity.

Definition at line 694 of file tpl_lhash.H.

References Aleph::GenLhashTable< Key, BucketType, Cmp >::len.

Referenced by printPars(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST_F(), TEST_F(), TEST_F(), and testResize().

◆ clear()

template<typename Key , class BucketType , class Cmp >
void Aleph::GenLhashTable< Key, BucketType, Cmp >::clear ( )
inlinenoexcept

Empties the container.

Exceptions
none
See also
empty()

Definition at line 374 of file tpl_lhash.H.

References Aleph::GenLhashTable< Key, BucketType, Cmp >::empty().

◆ contains()

template<typename Key , class BucketType , class Cmp >
bool Aleph::GenLhashTable< Key, BucketType, Cmp >::contains ( const Key &  key) const
inlinenoexcept

Checks if a key exists in the table.

Parameters
[in]keykey to search for.
Returns
true if key is present, false otherwise.
Exceptions
none

Definition at line 382 of file tpl_lhash.H.

References Aleph::GenLhashTable< Key, BucketType, Cmp >::search().

Referenced by TEST().

◆ current_alpha()

template<typename Key , class BucketType , class Cmp >
float Aleph::GenLhashTable< Key, BucketType, Cmp >::current_alpha ( ) const
inlinenoexcept

return the current table load; zero for a table without lists

Definition at line 479 of file tpl_lhash.H.

References Aleph::GenLhashTable< Key, BucketType, Cmp >::len, and Aleph::GenLhashTable< Key, BucketType, Cmp >::load().

Referenced by TEST().

◆ empty()

◆ get_compare() [1/2]

template<typename Key , class BucketType , class Cmp >
Cmp & Aleph::GenLhashTable< Key, BucketType, Cmp >::get_compare ( )
inline

Definition at line 221 of file tpl_lhash.H.

References Aleph::GenLhashTable< Key, BucketType, Cmp >::cmp.

Referenced by TEST(), and TEST().

◆ get_compare() [2/2]

template<typename Key , class BucketType , class Cmp >
const Cmp & Aleph::GenLhashTable< Key, BucketType, Cmp >::get_compare ( ) const
inline

Definition at line 223 of file tpl_lhash.H.

References Aleph::GenLhashTable< Key, BucketType, Cmp >::cmp.

◆ get_hash_fct()

template<typename Key , class BucketType , class Cmp >
Hash_Fct Aleph::GenLhashTable< Key, BucketType, Cmp >::get_hash_fct ( ) const
inlinenoexcept

◆ get_num_busy_slots()

template<typename Key , class BucketType , class Cmp >
const size_t & Aleph::GenLhashTable< Key, BucketType, Cmp >::get_num_busy_slots ( ) const
inlinenoexcept

Returns the number of occupied entries in the array.

Definition at line 701 of file tpl_lhash.H.

References Aleph::GenLhashTable< Key, BucketType, Cmp >::busy_slots_counter.

Referenced by printPars(), TEST_F(), and testResize().

◆ insert()

template<typename Key , class BucketType , class Cmp >
Bucket * Aleph::GenLhashTable< Key, BucketType, Cmp >::insert ( Bucket *  bucket)
inline

◆ is_empty()

template<typename Key , class BucketType , class Cmp >
constexpr bool Aleph::GenLhashTable< Key, BucketType, Cmp >::is_empty ( ) const
inlineconstexprnoexcept

◆ load()

◆ make_default_lists()

◆ operator=() [1/2]

template<typename Key , class BucketType , class Cmp >
GenLhashTable & Aleph::GenLhashTable< Key, BucketType, Cmp >::operator= ( const GenLhashTable< Key, BucketType, Cmp > &  )
delete

◆ operator=() [2/2]

template<typename Key , class BucketType , class Cmp >
GenLhashTable & Aleph::GenLhashTable< Key, BucketType, Cmp >::operator= ( GenLhashTable< Key, BucketType, Cmp > &&  other)
inlinenoexcept

Frees the buckets and the lists of this table, and takes those of other, with what rules them: the hash function, the comparator, the load thresholds and the policies.

Parameters
[in,out]otherTable to take the buckets from. It is left empty, without lists and usable, with what ruled this table: the two tables swap their hash functions, their comparators, their load thresholds and their policies, so that nothing is copied and nothing is allocated. Only a comparator that can be copied and not moved is copied: swap() swaps it through its copies.
Returns
A reference to this table.

Definition at line 341 of file tpl_lhash.H.

References Aleph::GenLhashTable< Key, BucketType, Cmp >::busy_slots_counter, Aleph::GenLhashTable< Key, BucketType, Cmp >::empty(), Aleph::GenLhashTable< Key, BucketType, Cmp >::len, Aleph::GenLhashTable< Key, BucketType, Cmp >::remove_all_buckets, Aleph::GenLhashTable< Key, BucketType, Cmp >::swap(), and Aleph::GenLhashTable< Key, BucketType, Cmp >::table.

◆ remove()

template<typename Key , class BucketType , class Cmp >
Bucket * Aleph::GenLhashTable< Key, BucketType, Cmp >::remove ( Bucket *  bucket)
inlinenoexcept

Removes bucket from the table.

Returns the bucket address. A table that resizes itself then shrinks to about half its capacity if its load factor dropped below the lower threshold, provided the keys stay there under the upper one; if there is no memory for the smaller table, it keeps its capacity. WARNING: it is not verified that the bucket belongs to the table.

Definition at line 587 of file tpl_lhash.H.

References Aleph::and, Aleph::GenLhashTable< Key, BucketType, Cmp >::len, Aleph::GenLhashTable< Key, BucketType, Cmp >::load(), Aleph::GenLhashTable< Key, BucketType, Cmp >::lower_alpha, Primes::next_prime(), Aleph::GenLhashTable< Key, BucketType, Cmp >::remove_bucket(), Aleph::GenLhashTable< Key, BucketType, Cmp >::resize(), Aleph::GenLhashTable< Key, BucketType, Cmp >::upper_alpha, and Aleph::GenLhashTable< Key, BucketType, Cmp >::with_resize.

Referenced by Aleph::DynLhashTable< Key, Record, Cmp >::remove(), TEST(), TEST(), TEST_F(), TEST_F(), and TEST_F().

◆ remove_bucket()

◆ resize()

template<typename Key , class BucketType , class Cmp >
size_t Aleph::GenLhashTable< Key, BucketType, Cmp >::resize ( const size_t  new_size)
inline

Resizes the table to new_size lists and places every bucket again.

If the table resizes itself and its load factor would reach upper_alpha with new_size lists, it takes the capacity that it would grow to as it placed the buckets: twice as many lists, to a prime, until the load factor stays below upper_alpha. The whole capacity is allocated before a bucket moves, so the buckets are placed without growing on the way.

Parameters
[in]new_sizeThe number of lists; 0 leaves the table as it is. A table that a move left without lists takes them here.
Returns
The capacity of the table.
Exceptions
std::overflow_errorif the bytes of the lists do not fit in a size_t, and std::bad_alloc if there is no memory for them; the table is then left as it was.
Precondition
The hash function and the comparison do not throw, as in every operation of the table.

Definition at line 627 of file tpl_lhash.H.

References Aleph::and, Aleph::GenLhashTable< Key, BucketType, Cmp >::busy_slots_counter, Aleph::GenLhashTable< Key, BucketType, Cmp >::insert(), Aleph::GenLhashTable< Key, BucketType, Cmp >::len, Aleph::GenLhashTable< Key, BucketType, Cmp >::size(), Aleph::GenLhashTable< Key, BucketType, Cmp >::table, Aleph::GenLhashTable< Key, BucketType, Cmp >::upper_alpha, and Aleph::GenLhashTable< Key, BucketType, Cmp >::with_resize.

Referenced by Aleph::GenLhashTable< Key, BucketType, Cmp >::insert(), Aleph::GenLhashTable< Key, BucketType, Cmp >::remove(), Aleph::GenLhashTable< Key, BucketType, Cmp >::search_or_insert(), Aleph::GenLhashTable< Key, BucketType, Cmp >::set_hash_fct(), TEST(), and testResize().

◆ search()

template<typename Key , class BucketType , class Cmp >
Bucket * Aleph::GenLhashTable< Key, BucketType, Cmp >::search ( const Key &  key) const
inlinenoexcept

◆ search_in_bucket_list()

template<typename Key , class BucketType , class Cmp >
Bucket * Aleph::GenLhashTable< Key, BucketType, Cmp >::search_in_bucket_list ( BucketList &  list,
const Key &  key 
) const
inlineprivate

◆ search_next()

template<typename Key , class BucketType , class Cmp >
Bucket * Aleph::GenLhashTable< Key, BucketType, Cmp >::search_next ( Bucket *  bucket) const
inline

Returns the next bucket that collides with bucket.

If it does not exist, then nullptr is returned.

Definition at line 672 of file tpl_lhash.H.

References Aleph::GenLhashTable< Key, BucketType, Cmp >::cmp, Aleph::GenLhashTable< Key, BucketType, Cmp >::hash_fct, Aleph::GenLhashTable< Key, BucketType, Cmp >::len, and Aleph::GenLhashTable< Key, BucketType, Cmp >::table.

◆ search_or_insert()

◆ search_with_custom_hash()

template<typename Key , class BucketType , class Cmp >
template<typename HashFunc , typename SearchKey >
Bucket * Aleph::GenLhashTable< Key, BucketType, Cmp >::search_with_custom_hash ( HashFunc  hash_func,
const SearchKey &  search_key 
) const
inlineprotectednoexcept

Helper method for derived classes to perform custom heterogeneous searches.

This method allows derived classes (such as DynMapHashTable) to search for elements using a different type than the stored key type, without needing to construct the full key object. This is particularly useful for map-like wrappers that store pairs but want to search by key only.

Parameters
hash_funcFunction to compute the hash of the search key
search_keyThe key to search for (can be different type than Key)
Returns
Pointer to the bucket if found, nullptr otherwise
Note
The comparator (cmp) must support comparison between the stored Key type and the SearchKey type for this to work. For example, Dft_Pair_Cmp supports comparing Pair with Key.

Example usage in DynMapHashTable:

Pair * search(const Key & key) const {
return this->search_with_custom_hash(original_hash_fct, key);
}
Bucket * search(const Key &key) const noexcept
Search in the table for a bucket with key.
Definition tpl_lhash.H:555
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

Definition at line 419 of file tpl_lhash.H.

References Aleph::GenLhashTable< Key, BucketType, Cmp >::cmp, Aleph::GenLhashTable< Key, BucketType, Cmp >::len, and Aleph::GenLhashTable< Key, BucketType, Cmp >::table.

◆ set_hash_fct() [1/2]

template<typename Key , class BucketType , class Cmp >
void Aleph::GenLhashTable< Key, BucketType, Cmp >::set_hash_fct ( Hash_Fct  fct)
inline

Sets the hash function.

On a table that is not empty, it places every bucket again with the new function, as resize() does, so the keys already stored are still found; a table that resizes itself, with a load factor at upper_alpha or above, then grows as resize() says.

Parameters
[in]fctThe new hash function.
Exceptions
std::bad_allocif there is no memory for the lists where the buckets go again; the table then keeps its function and its lists.
Precondition
The new function and the comparison of the table do not throw, as in every search of the table, which is noexcept: if one threw while the buckets are placed again, some of them would be left out of the table.
Note
It takes O(1) on an empty table and O(n) otherwise.

Definition at line 454 of file tpl_lhash.H.

References Aleph::GenLhashTable< Key, BucketType, Cmp >::hash_fct, Aleph::GenLhashTable< Key, BucketType, Cmp >::len, and Aleph::GenLhashTable< Key, BucketType, Cmp >::resize().

Referenced by Aleph::GenLhashTable< Key, BucketType, Cmp >::set_hash_fct(), and TEST_F().

◆ set_hash_fct() [2/2]

template<typename Key , class BucketType , class Cmp >
void Aleph::GenLhashTable< Key, BucketType, Cmp >::set_hash_fct ( Hash_Fct_Ptr  fct)
inline

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 473 of file tpl_lhash.H.

References Aleph::GenLhashTable< Key, BucketType, Cmp >::set_hash_fct().

◆ size()

template<typename Key , class BucketType , class Cmp >
const size_t & Aleph::GenLhashTable< Key, BucketType, Cmp >::size ( ) const
inlinenoexcept

Returns the number of elements contained in the table.

Definition at line 697 of file tpl_lhash.H.

References Aleph::GenLhashTable< Key, BucketType, Cmp >::N.

Referenced by main(), printPars(), Aleph::GenLhashTable< Key, BucketType, Cmp >::resize(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST_F(), and testResize().

◆ swap()

template<typename Key , class BucketType , class Cmp >
void Aleph::GenLhashTable< Key, BucketType, Cmp >::swap ( GenLhashTable< Key, BucketType, Cmp > &  other)
inlinenoexcept

Swaps this table with other in constant time.

The buckets travel with everything that rules them: the hash function, the comparator, the load thresholds and the resizing policy.

Parameters
[in,out]otherTable to swap with.
Note
A comparator that can be copied and not moved is swapped through its copies; if one of them throws, std::terminate is called.

Definition at line 276 of file tpl_lhash.H.

References Aleph::GenLhashTable< Key, BucketType, Cmp >::busy_slots_counter, Aleph::GenLhashTable< Key, BucketType, Cmp >::cmp, Aleph::GenLhashTable< Key, BucketType, Cmp >::hash_fct, Aleph::GenLhashTable< Key, BucketType, Cmp >::len, Aleph::GenLhashTable< Key, BucketType, Cmp >::lower_alpha, Aleph::GenLhashTable< Key, BucketType, Cmp >::remove_all_buckets, hash_dry_detail::swap_compare(), Aleph::GenLhashTable< Key, BucketType, Cmp >::table, Aleph::GenLhashTable< Key, BucketType, Cmp >::upper_alpha, and Aleph::GenLhashTable< Key, BucketType, Cmp >::with_resize.

Referenced by Aleph::GenLhashTable< Key, BucketType, Cmp >::operator=(), Aleph::DynLhashTable< Key, Record, Cmp >::swap(), and TEST().

Friends And Related Symbol Documentation

◆ HashStats< GenLhashTable< Key, BucketType, Cmp > >

template<typename Key , class BucketType , class Cmp >
friend class HashStats< GenLhashTable< Key, BucketType, Cmp > >
friend

Definition at line 1 of file tpl_lhash.H.

Member Data Documentation

◆ busy_slots_counter

◆ cmp

◆ hash_fct

◆ len

template<typename Key , class BucketType , class Cmp >
size_t Aleph::GenLhashTable< Key, BucketType, Cmp >::len
protected

Definition at line 209 of file tpl_lhash.H.

Referenced by Aleph::GenLhashTable< Key, BucketType, Cmp >::GenLhashTable(), Aleph::GenLhashTable< Key, BucketType, Cmp >::capacity(), Aleph::GenLhashTable< Key, BucketType, Cmp >::current_alpha(), Aleph::GenLhashTable< Key, BucketType, Cmp >::empty(), Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::get_curr(), Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::has_curr(), Aleph::GenLhashTable< Key, BucketType, Cmp >::insert(), Aleph::GenLhashTable< Key, BucketType, Cmp >::load(), 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 >::make_default_lists(), Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::next(), Aleph::GenLhashTable< Key, BucketType, Cmp >::operator=(), Aleph::GenLhashTable< Key, BucketType, Cmp >::remove(), Aleph::GenLhashTable< Key, BucketType, Cmp >::remove_bucket(), Aleph::GenLhashTable< Key, BucketType, Cmp >::Iterator::reset_last(), Aleph::GenLhashTable< Key, BucketType, Cmp >::resize(), Aleph::GenLhashTable< Key, BucketType, Cmp >::search(), Aleph::GenLhashTable< Key, BucketType, Cmp >::search_next(), Aleph::GenLhashTable< Key, BucketType, Cmp >::search_or_insert(), Aleph::GenLhashTable< Key, BucketType, Cmp >::search_with_custom_hash(), Aleph::GenLhashTable< Key, BucketType, Cmp >::set_hash_fct(), and Aleph::GenLhashTable< Key, BucketType, Cmp >::swap().

◆ lower_alpha

template<typename Key , class BucketType , class Cmp >
float Aleph::GenLhashTable< Key, BucketType, Cmp >::lower_alpha
protected

◆ N

◆ remove_all_buckets

template<typename Key , class BucketType , class Cmp >
bool Aleph::GenLhashTable< Key, BucketType, Cmp >::remove_all_buckets
private

◆ table

template<typename Key , class BucketType , class Cmp >
BucketList* Aleph::GenLhashTable< Key, BucketType, Cmp >::table
private

◆ upper_alpha

◆ with_resize


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