#include <robin_hash.h>
template<typename ValueType, bool StoreHash>
class tsl::detail_robin_hash::bucket_entry< ValueType, StoreHash >
Each bucket entry has:
- A value of type
ValueType.
- An integer to store how far the value of the bucket, if any, is from its ideal bucket (ex: if the current bucket 5 has the value 'foo' and ‘hash('foo’) % nb_buckets
== 3, dist_from_ideal_bucket()` will return 2 as the current value of the bucket is two buckets away from its ideal bucket) If there is no value in the bucket (i.e. empty() is true) dist_from_ideal_bucket() will be < 0.
- A marker which tells us if the bucket is the last bucket of the bucket array (useful for the iterator of the hash table).
- If
StoreHash is true, 32 bits of the hash of the value, if any, are also stored in the bucket. If the size of the hash is more than 32 bits, it is truncated. We don't store the full hash as storing the hash is a potential opportunity to use the unused space due to the alignment of the bucket_entry structure. We can thus potentially store the hash without any extra space (which would not be possible with 64 bits of the hash).
◆ bucket_hash
template<typename ValueType , bool StoreHash>
◆ distance_type
template<typename ValueType , bool StoreHash>
◆ storage
template<typename ValueType , bool StoreHash>
◆ value_type
template<typename ValueType , bool StoreHash>
◆ bucket_entry() [1/4]
template<typename ValueType , bool StoreHash>
◆ bucket_entry() [2/4]
template<typename ValueType , bool StoreHash>
◆ bucket_entry() [3/4]
template<typename ValueType , bool StoreHash>
◆ bucket_entry() [4/4]
template<typename ValueType , bool StoreHash>
Never really used, but still necessary as we must call resize on an empty std::vector<bucket_entry>. and we need to support move-only types. See robin_hash constructor for details.
◆ ~bucket_entry()
template<typename ValueType , bool StoreHash>
◆ clear()
template<typename ValueType , bool StoreHash>
◆ destroy_value()
template<typename ValueType , bool StoreHash>
◆ dist_from_ideal_bucket()
template<typename ValueType , bool StoreHash>
◆ empty()
template<typename ValueType , bool StoreHash>
◆ last_bucket()
template<typename ValueType , bool StoreHash>
◆ operator=() [1/2]
template<typename ValueType , bool StoreHash>
◆ operator=() [2/2]
template<typename ValueType , bool StoreHash>
◆ set_as_last_bucket()
template<typename ValueType , bool StoreHash>
◆ set_value_of_empty_bucket()
template<typename ValueType , bool StoreHash>
template<typename... Args>
◆ swap_with_value_in_bucket()
template<typename ValueType , bool StoreHash>
◆ truncate_hash()
template<typename ValueType , bool StoreHash>
◆ value() [1/2]
template<typename ValueType , bool StoreHash>
◆ value() [2/2]
template<typename ValueType , bool StoreHash>
◆ EMPTY_MARKER_DIST_FROM_IDEAL_BUCKET
template<typename ValueType , bool StoreHash>
◆ m_dist_from_ideal_bucket
template<typename ValueType , bool StoreHash>
◆ m_last_bucket
template<typename ValueType , bool StoreHash>
◆ m_value
template<typename ValueType , bool StoreHash>
The documentation for this class was generated from the following file: