This class template provides a flat hash table implementation useful for implementing a flat hash set and flat hash map.
Synopsis
Declared in <bdlc_flathashtable.h>
template<
class KEY,
class ENTRY,
class ENTRY_UTIL,
class HASH,
class EQUAL>
class FlatHashTable;
Type Aliases
Name |
Description |
Iterator over non‐modifiable entries. |
|
Entry type stored by this table. |
|
Utility that extracts keys from entries. |
|
Hash functor type. |
|
Iterator over modifiable entries. |
|
Key equality predicate type. |
|
Key type of this table. |
Member Functions
Name |
Description |
|
Constructors |
|
Destroy this object and each of its entries. |
Assignment operators |
|
Return the allocator used by this hash table to supply memory. |
|
|
|
Return the number of elements this table could hold if the load factor were 1. |
|
Return an iterator representing the beginning of the sequence of entries held by this container. |
|
Return an iterator one past the last entry in this table. |
|
Remove all entries from this table. Note that this table will be empty after calling this method, but allocated memory may be retained for future use. See the |
|
Return |
|
Return the address of the first element of the underlying array of control values in this table, or 0 if this table is in the zero‐capacity state. An element of this array has the value |
|
Return the number of objects contained within this table having the specified |
|
Create an |
|
Return |
|
Return an iterator representing one past the end of the sequence of entries held by this container. |
|
Return the address of the first element of the underlying array of entries in this table, or 0 if this table is in the zero‐capacity state. The behavior is undefined unless the address is verified in‐use through use of the |
|
|
|
|
|
|
|
Return (a copy of) the unary hash functor used by this flat hash table to generate a hash value (of type `bsl::size_t) for a `KEY' object. |
|
|
|
Insert the specified |
|
Return (a copy of) the binary key‐equality functor used by this flat hash table that returns |
|
Return the current ratio between the number of elements in this table and its capacity. |
|
Return the maximum load factor allowed for this table. Note that if an insert operation would cause the load factor to exceed the |
|
If an entry with the specified |
|
Change the capacity of this table to at least the specified |
|
Change the capacity of this table to at least a capacity that can accommodate the specified |
|
Remove all entries from this table and release all memory from this table, returning the table to the zero‐capacity state. |
|
Return the number of entries in this table. |
|
Efficiently exchange the value of this table with the value of the specified |
|
|
Static Data Members
Name |
Description |
Mask extracting the 7‐bit hashlet from a full hash value. |
|
Denominator of the maximum load‐factor fraction (7/8). |
|
Numerator of the maximum load‐factor fraction (7/8). |
|
Minimum non‐zero table capacity (two control groups). |
Non-Member Functions
Name |
Description |
Return |
|
Return |
|
Exchange the values of the specified |
Created with MrDocs