Node based (closed addressing) hash table. More...
#include <di/container/hash/node/node_hash_table.h>
Public Member Functions | |
NodeHashTable ()=default | |
NodeHashTable (NodeHashTable const &)=delete | |
auto | operator= (NodeHashTable const &) -> NodeHashTable &=delete |
constexpr | NodeHashTable (Eq eq, Hasher hasher={}) |
constexpr | NodeHashTable (NodeHashTable &&other) |
constexpr auto | operator= (NodeHashTable &&other) -> NodeHashTable & |
constexpr | ~NodeHashTable () |
constexpr auto | size () const -> usize |
constexpr auto | empty () const -> bool |
constexpr auto | bucket_count () const -> usize |
constexpr auto | begin () -> Iterator |
constexpr auto | begin () const -> ConstIterator |
constexpr auto | end () -> Iterator |
constexpr auto | end () const -> ConstIterator |
constexpr auto | unconst_iterator (ConstIterator it) -> Iterator |
constexpr auto | insert_node (Node &node) |
constexpr auto | insert_node (ConstIterator, Node &node) |
constexpr auto | erase_impl (ConstIterator it) -> Iterator |
template<typename U> requires (concepts::Predicate<Eq&, Key const&, U const&> && concepts::HashSame<Key, U>) | |
constexpr auto | equal_range_impl (U &&needle) const |
template<typename U> requires (concepts::Predicate<Eq&, Key const&, U const&> && concepts::HashSame<Key, U>) | |
constexpr auto | find_impl (U &&needle) const -> ConstIterator |
constexpr auto | reserve (usize new_capacity) -> decltype(util::declval< Buckets & >().reserve_from_nothing(new_capacity)) |
constexpr void | merge_impl (NodeHashTable &&other) |
Protected Types | |
using | Node = HashNode<Tag> |
using | Iterator = HashNodeIterator<Value, Tag> |
using | ConstIterator = container::ConstIteratorImpl<Iterator> |
using | ConcreteNode = decltype(Tag::node_type(in_place_type<Value>)) |
using | Key = meta::Type<detail::NodeHashTableKey<Value, is_map>> |
Protected Member Functions | |
constexpr auto | down_cast_self () -> decltype(auto) |
constexpr auto | node_value (Node &node) const -> Value & |
constexpr auto | node_value (Node const &node) const -> Value const & |
constexpr void | merge_impl_without_rehashing (NodeHashTable &&other) |
constexpr auto | insert_node_without_rehashing (Node &node, bool call_insertion_hook=true) |
template<typename U> | |
constexpr auto | hash (U const &value) const -> u64 |
constexpr auto | hash (Value const &value) const -> u64 |
template<typename T, typename U> | |
constexpr auto | equal (T const &a, U const &b) const -> bool |
template<typename T> | |
constexpr auto | equal (T const &a, Value const &b) const -> bool |
template<typename T> | |
constexpr auto | equal (Value const &a, T const &b) const -> bool |
constexpr auto | equal (Value const &a, Value const &b) const -> bool |
Protected Attributes | |
Buckets | m_buckets {} |
usize | m_size { 0 } |
Eq | m_eq {} |
Hasher | m_hasher {} |
Static Protected Attributes | |
static constexpr bool | allow_rehashing_in_insert = false |
Friends | |
template<typename, typename, concepts::Hasher, typename, typename, typename, bool, bool, typename> | |
class | NodeHashTable |
Node based (closed addressing) hash table.
This is fairly straightforward implementation of a hash table. It uses a vector of buckets, where each bucket is a singlely-linked list of nodes.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
default |
|
delete |
|
inlineexplicitconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexprprotected |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexprprotected |
|
inlineconstexprprotected |
|
inlineconstexprprotected |
|
inlineconstexprprotected |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexprprotected |
|
inlineconstexprprotected |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexprprotected |
|
inlineconstexpr |
|
inlineconstexprprotected |
|
inlineconstexprprotected |
|
inlineconstexprprotected |
|
inlineconstexpr |
|
delete |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
friend |
|
staticconstexprprotected |
|
protected |
|
protected |
|
protected |
|
protected |