|
Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
|
Open addressing hash table with linear probing collision resolution. More...
#include <tpl_olhash.H>
Classes | |
| struct | Bucket |
Public Types | |
| enum | Status { EMPTY , BUSY , DELETED } |
| using | Key_Type = Key |
| using | Item_Type = Key |
| using | Hash_Fct = std::function< size_t(const Key &)> |
| using | Hash_Fct_Ptr = size_t(*)(const Key &) |
| using | Base = OhashCommon< OLhashTable< Key, Cmp >, Key > |
| using | Stats = typename OhashCommon< OLhashTable< Key, Cmp >, Key >::Stats |
Public Types inherited from OhashCommon< HashTbl, Key > | |
| using | Const_Iterator = Aleph::Const_Iterator< Iterator > |
| Read-only iterator: the iterator of a constant table. | |
Public Types inherited from StlAlephIterator< SetName > | |
| using | iterator = StlIterator< SetName > |
| using | const_iterator = StlConstIterator< SetName > |
Public Member Functions | |
| constexpr const Cmp & | get_compare () const noexcept |
| constexpr Cmp & | get_compare () noexcept |
| OLhashTable (const size_t l, Hash_Fct hash_f, Cmp cmp_f, const float l_alpha, const float u_alpha, const bool resize) | |
| Instantiate a hash table with hash function __hash_fct and dimension len. | |
| OLhashTable (size_t len, Hash_Fct hash_fct, Hash_Fct, Cmp cmp, float lower_alpha, float upper_alpha, bool with_resize) | |
| OLhashTable (size_t len=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=0.70f, bool with_resize=true) | |
| OLhashTable (size_t len, Hash_Fct_Ptr hash_fct, Hash_Fct_Ptr, Cmp cmp, float lower_alpha, float upper_alpha, bool with_resize) | |
| OLhashTable (size_t len, Hash_Fct hash_fct, Hash_Fct_Ptr, Cmp cmp, float lower_alpha, float upper_alpha, bool with_resize) | |
| Constructor with two hash functions for metaprogramming compatibility with ODhashTable type. | |
| template<typename H > requires hash_table_detail::Class_Convertible_To_Ptr<H, Hash_Fct_Ptr> | |
| OLhashTable (size_t len, H &&hash_fct, Cmp cmp, float lower_alpha, float upper_alpha, bool with_resize) | |
| Builds a table whose hash function is a lambda without captures. | |
| template<typename H1 , typename H2 > requires (std::is_constructible_v<Hash_Fct, H1> and std::is_constructible_v<Hash_Fct, H2> and (hash_table_detail::Class_Convertible_To_Ptr<H1, Hash_Fct_Ptr> or hash_table_detail::Class_Convertible_To_Ptr<H2, Hash_Fct_Ptr>)) | |
| OLhashTable (size_t len, H1 &&hash_fct, H2 &&, Cmp cmp, float lower_alpha, float upper_alpha, bool with_resize) | |
| Builds a table from two hash functions when one of them is a lambda without captures. | |
| template<template< typename > class List> | |
| OLhashTable (const List< Key > &l) | |
| template<class It > requires (not std::is_arithmetic_v<It> and requires (It it) { *it; ++it; it != it; }) | |
| OLhashTable (It b, It e) | |
| OLhashTable (std::initializer_list< Key > l) | |
| ~OLhashTable () | |
| Release all occupied memory. | |
| void | swap (OLhashTable &other) noexcept |
Swaps this table with other in constant time. | |
| OLhashTable (const OLhashTable &other) | |
| Copy constructor. | |
| OLhashTable (OLhashTable &&other) noexcept | |
| Move constructor. | |
| OLhashTable & | operator= (const OLhashTable &other) |
| Copy assignment. | |
| OLhashTable & | operator= (OLhashTable &&other) noexcept |
| Key * | search (const Key &key) noexcept |
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. The same record, modifiable. | |
| const Key * | search (const Key &key) const noexcept |
| Finds the key and returns the associated record if key is find inside the table; otherwise, nullptr is returned. | |
| void | remove (const Key &key) |
| Remove the key referenced by key. | |
| Hash_Fct | get_hash_fct () const noexcept |
| void | set_hash_fct (Hash_Fct fct) |
| void | set_hash_fct (Hash_Fct_Ptr fct) |
| Stats | stats () const |
| constexpr bool | contains (const Key &key) const noexcept |
| Alias for has(). | |
Public Member Functions inherited from OhashCommon< HashTbl, Key > | |
| constexpr float | get_lower_alpha () const noexcept |
| Returns the lower load factor threshold for automatic shrinking. | |
| constexpr float | get_upper_alpha () const noexcept |
| Returns the upper load factor threshold for automatic growing. | |
| 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. | |
| void | copy_from_table (const HashTbl &other) |
| Copies all entries from another hash table. | |
| void | clean_table () |
| Removes all entries from the table without deallocating storage. | |
| bool | check_resize_before_insert () |
| Makes room for one more key, if the table can take it. | |
| Key * | insert (const Key &key) |
| Inserts a key into the hash table (copy version). | |
| Key * | insert (Key &&key) |
| Inserts a key into the hash table (move version). | |
| Key * | search_or_insert (const Key &key) |
| Searches for a key, inserting it if not found (copy version). | |
| Key * | search_or_insert (Key &&key) |
| Searches for a key, inserting it if not found (move version). | |
| std::pair< Key *, bool > | contains_or_insert (const Key &key) |
| Searches for a key, inserting if not found, with existence flag (copy version). | |
| std::pair< Key *, bool > | contains_or_insert (Key &&key) |
| Searches for a key, inserting if not found, with existence flag (move version). | |
| Key * | append (const Key &key) |
| Alias for insert() (copy version). | |
| Key * | append (Key &&key) |
| Alias for insert() (move version). | |
| constexpr bool | has (const Key &key) const noexcept |
| Checks if a key exists in the table. | |
| constexpr bool | contains (const Key &key) const noexcept |
| Alias for has(). | |
| Key & | find (const Key &key) |
| Finds a key and returns a reference to it. | |
| const Key & | find (const Key &key) const |
| Finds a key and returns a const reference to it. | |
| const Key & | operator[] (const Key &key) const |
| Subscript operator for const access. | |
| const Key & | operator[] (const Key &key) |
| Subscript operator with insertion semantics. | |
| void | remove_ptr (Key *key) |
| Removes an entry by pointer. | |
| size_t | resize (size_t new_size) |
| Resizes the hash table to a new capacity. | |
| void | rehash () |
| Rebuilds the hash table with the same capacity. | |
| void | empty () |
| Clears all entries and resets to default capacity. | |
| void | clear () |
| Empties the container. | |
| constexpr size_t | size () const noexcept |
| Returns the number of entries in the table. | |
| constexpr bool | is_empty () const noexcept |
| Checks if the table is empty. | |
| constexpr size_t | capacity () const noexcept |
| Returns the current capacity of the table. | |
| DynList< Key > | keys () const |
| Returns a list containing all keys in the table. | |
| auto | items () const |
| Alias for keys(). | |
| void | print_stats (const Stats &stats) const |
| Prints statistics to standard output. | |
| constexpr float | current_alpha () const noexcept |
| Returns the current load factor (alpha). | |
Public Member Functions inherited from GenericTraverse< Container > | |
| template<class Operation > requires Aleph::PredicateWith<Operation &, typename Aleph::concepts_detail::traverse_arg<Container, Operation>::type> | |
| bool | traverse (Operation &operation) noexcept(traverse_is_noexcept< Operation, typename Aleph::concepts_detail::traverse_arg< Container, Operation >::type, Container & >()) |
| Traverse the container via its iterator and performs a conditioned operation on each item. | |
| template<class Operation > requires Aleph::PredicateWith<Operation &, typename Aleph::concepts_detail::traverse_carg<Container, Operation>::type> | |
| bool | traverse (Operation &operation) const noexcept(traverse_is_noexcept< Operation, typename Aleph::concepts_detail::traverse_carg< Container, Operation >::type, const_source_t< Operation > >()) |
| Traverse a constant container; each item is handed out as a constant reference. | |
| template<class Operation > requires Aleph::PredicateWith<Operation &, typename Aleph::concepts_detail::traverse_carg<Container, Operation>::type> | |
| bool | traverse (Operation &&operation) const noexcept(traverse_is_noexcept< Operation, typename Aleph::concepts_detail::traverse_carg< Container, Operation >::type, const_source_t< Operation > >()) |
Overload of traverse(Operation &) const that accepts rvalues. | |
| template<class Operation > requires Aleph::PredicateWith<Operation &, typename Aleph::concepts_detail::traverse_arg<Container, Operation>::type> | |
| bool | traverse (Operation &&operation) noexcept(traverse_is_noexcept< Operation, typename Aleph::concepts_detail::traverse_arg< Container, Operation >::type, Container & >()) |
Overload of traverse(Operation &) that accepts rvalues. | |
Public Member Functions inherited from LocateFunctions< Container, Type > | |
| auto | get_it () |
| Return a properly initialized iterator positioned at the first item on the container. | |
| auto | get_it () const |
| Read-only iterator positioned at the first item. | |
| auto | get_it (const size_t pos) |
Return a properly initialized iterator positioned at the pos item on the container. | |
| auto | get_it (const size_t pos) const |
Read-only iterator positioned at the pos item. | |
| auto | get_itor () |
Alias of get_it(). | |
| auto | get_itor () const |
See get_itor(). | |
| template<class C = Container> requires Aleph::dry_detail::MutablyTraversable<C, Type> | |
| Type & | nth_ne (const size_t n) noexcept(Aleph::dry_detail::mutable_traversal_is_noexcept< C, Type >) |
| Return the n‑th element without bounds checking. | |
| const Type & | nth_ne (const size_t n) const noexcept(Aleph::dry_detail::const_traversal_is_noexcept< Container, Type >) |
Constant overload of nth_ne(size_t). | |
| template<class C = Container> requires Aleph::dry_detail::MutablyTraversable<C, Type> | |
| Type & | nth (const size_t n) |
| Return the n-th item of the container. | |
| const Type & | nth (const size_t n) const |
Const overload of nth(size_t). | |
| template<class Operation > requires Aleph::InvocablePredicateWith<Operation &, Type &> | |
| and Aleph::dry_detail::MutablyTraversable< typename Aleph::concepts_detail::defer< Container, Operation >::type, Type > Type * | find_ptr (Operation &operation) noexcept(mutable_search_is_noexcept< Operation >()) |
| Find a pointer to an item in the container according to a searching criterion. | |
| template<class Operation > requires Aleph::InvocablePredicateWith<Operation &, const Type &> | |
| const Type * | find_ptr (Operation &operation) const noexcept(const_search_is_noexcept< Operation >()) |
Const overload of find_ptr(Operation&). | |
| template<class Operation > requires Aleph::InvocablePredicateWith<Operation &, const Type &> | |
| const Type * | find_ptr (Operation &&operation) const noexcept(const_search_is_noexcept< Operation >()) |
| Overload of find_ptr() const that accepts rvalues. | |
| template<class Operation > requires Aleph::InvocablePredicateWith<Operation &, Type &> | |
| and Aleph::dry_detail::MutablyTraversable< typename Aleph::concepts_detail::defer< Container, Operation >::type, Type > Type * | find_ptr (Operation &&operation) noexcept(mutable_search_is_noexcept< Operation >()) |
| Overload of find_ptr() that accepts rvalues. | |
| template<class Operation > requires Aleph::InvocablePredicateWith<Operation &, const Type &> | |
| size_t | find_index (Operation &operation) const noexcept(const_search_is_noexcept< Operation >()) |
| Find the position of an item in the container according to a searching criterion. | |
| template<class Operation > requires Aleph::InvocablePredicateWith<Operation &, const Type &> | |
| size_t | find_index (Operation &&operation) const noexcept(const_search_is_noexcept< Operation >()) |
| Overload of find_index() that accepts rvalues. | |
| template<class Operation , class T = Type> requires Aleph::InvocablePredicateWith<Operation &, const Type &> | |
| and std::default_initializable< T > and std::copy_constructible< T > std::tuple< bool, Type > | find_item (Operation &operation) const noexcept(find_item_is_noexcept< Operation >()) |
| Safe sequential searching of an item matching a criterion. | |
| template<class Operation , class T = Type> requires Aleph::InvocablePredicateWith<Operation &, const Type &> | |
| and std::default_initializable< T > and std::copy_constructible< T > std::tuple< bool, Type > | find_item (Operation &&operation) const noexcept(find_item_is_noexcept< Operation >()) |
| Overload of find_item() that accepts rvalues. | |
| template<class Operation , class T = Type> requires Aleph::InvocablePredicateWith<Operation &, const Type &> | |
| and std::copy_constructible< T > std::optional< Type > | find_opt (Operation &operation) const |
| Copy of the first item satisfying a criterion, if any. | |
| template<class Operation , class T = Type> requires Aleph::InvocablePredicateWith<Operation &, const Type &> | |
| and std::copy_constructible< T > std::optional< Type > | find_opt (Operation &&operation) const |
| Overload of find_opt() that accepts rvalues. | |
| template<class Operation > requires Aleph::InvocablePredicateWith<Operation &, const Type &> | |
| bool | contains_if (Operation &&operation) const noexcept(const_search_is_noexcept< Operation >()) |
| Test if an item satisfying a criterion is present in the container. | |
| template<class T = Type> requires requires(const T & a, const T & b) { { a == b } -> std::convertible_to<bool>; } | |
| bool | contains (const Type &item) const |
| Test if an item is present in the container using equality. | |
Public Member Functions inherited from FunctionalMethods< Container, T > | |
| void | emplace (Args &&... args) |
| Appends a new element into the container by constructing it from the given args. | |
| void | emplace_end (Args &&... args) |
See emplace(Args && ... args). | |
| void | emplace_ins (Args &&... args) |
| template<typename... Args> requires ((std::convertible_to<Args &&, T> and ...) and (Aleph::InsertableWith<typename Aleph::concepts_detail::defer<Container, std::tuple<Args...>>::type, Item_Arg<Args>> and ...)) | |
| size_t | ninsert (Args &&... args) |
| Insert n variadic items. | |
| template<typename... Args> requires ((std::convertible_to<Args &&, T> and ...) and (Aleph::AppendableWith<typename Aleph::concepts_detail::defer<Container, std::tuple<Args...>>::type, Item_Arg<Args>> and ...)) | |
| size_t | nappend (Args &&... args) |
| Append n variadic items. | |
| template<class Operation > requires Aleph::InvocableWith<Operation &, const T &> | |
| void | for_each (Operation &operation) const |
| Traverse all the container and performs an operation on each element. | |
| template<class Operation > requires Aleph::InvocableWith<Operation &, const T &> | |
| void | for_each (Operation &&operation) const |
| Overload of for_each() that accepts rvalues. | |
| template<class Operation > requires Aleph::InvocableWith<Operation &, const T &> | |
| void | each (Operation &operation) const |
| Alias of for_each(). | |
| template<class Operation > requires Aleph::InvocableWith<Operation &, const T &> | |
| void | each (Operation &&operation) const |
| Alias of for_each() that accepts rvalues. | |
| template<class Operation > requires Aleph::InvocableWith<Operation &, const T &> | |
| void | each (const size_t pos, const size_t slice, Operation &operation) const |
Traverse the container starting at pos taking one item every slice, performing an operation on each visited element. | |
| template<class Operation > requires Aleph::InvocableWith<Operation &, const T &> | |
| void | each (const size_t pos, const size_t slice, Operation &&operation) const |
See each(size_t pos, size_t slice, Operation & operation) const. | |
| template<class Operation > requires Aleph::InvocableWith<Operation &, T &> | |
| and Aleph::dry_detail::MutablyTraversable< typename Aleph::concepts_detail::defer< Container, Operation >::type, T > void | each (const size_t pos, const size_t slice, Operation &operation) |
Traverse the container starting at pos taking one item every slice, performing an operation that may modify each visited item. | |
| template<class Operation > requires Aleph::InvocableWith<Operation &, T &> | |
| and Aleph::dry_detail::MutablyTraversable< typename Aleph::concepts_detail::defer< Container, Operation >::type, T > void | each (const size_t pos, const size_t slice, Operation &&operation) |
See each(size_t pos, size_t slice, Operation & operation). | |
| template<class Operation > requires Aleph::InvocableWith<Operation &, T &> | |
| and Aleph::dry_detail::MutablyTraversable< typename Aleph::concepts_detail::defer< Container, Operation >::type, T > void | mutable_for_each (Operation &operation) |
| Apply a mutable operation to each element of the container. | |
| template<class Operation > requires Aleph::InvocableWith<Operation &, T &> | |
| and Aleph::dry_detail::MutablyTraversable< typename Aleph::concepts_detail::defer< Container, Operation >::type, T > void | mutable_for_each (Operation &&operation) |
See mutable_for_each(Operation & operation). | |
| template<class Operation > requires Aleph::InvocablePredicateWith<Operation &, const T &> | |
| bool | all (Operation &operation) const |
| Check if all the elements of the container satisfy a condition. | |
| template<class Operation > requires Aleph::InvocablePredicateWith<Operation &, const T &> | |
| bool | all (Operation &&operation) const |
| Overload of all() that accepts rvalues. | |
| template<class Operation > requires Aleph::InvocablePredicateWith<Operation &, const T &> | |
| bool | exists (Operation &op) const |
| Test for existence in the container of an element satisfying a criterion. | |
| template<class Operation > requires Aleph::InvocablePredicateWith<Operation &, const T &> | |
| bool | exists (Operation &&op) const |
| Overload of exists() that accepts rvalues. | |
| template<class Operation > requires Aleph::InvocablePredicateWith<Operation &, const T &> | |
| bool | none (Operation &op) const |
| Test that no element satisfies a criterion. | |
| template<class Operation > requires Aleph::InvocablePredicateWith<Operation &, const T &> | |
| bool | none (Operation &&op) const |
| Overload of none() that accepts rvalues. | |
| template<class Operation > requires Aleph::InvocablePredicateWith<Operation &, const T &> | |
| size_t | count_if (Operation &op) const |
| Count the elements that satisfy a criterion. | |
| template<class Operation > requires Aleph::InvocablePredicateWith<Operation &, const T &> | |
| size_t | count_if (Operation &&op) const |
| Overload of count_if() that accepts rvalues. | |
| Aleph::DynList< Aleph::dry_detail::map_result_t< R, Operation &, T > > | maps (Operation &op) const |
| Aleph::DynList< Aleph::dry_detail::map_result_t< R, Operation &, T > > | maps (Operation &&op) const |
| Aleph::DynList< Aleph::dry_detail::map_result_t< R, Operation &, T > > | maps_if (Prop prop, Operation &op) const |
| Aleph::DynList< Aleph::dry_detail::map_result_t< R, Operation &, T > > | maps_if (Prop prop, Operation &&op) const |
| Aleph::DynList< Aleph::dry_detail::map_result_t< R, Operation &, T > > | map (Operation &op) const |
| Aleph::DynList< Aleph::dry_detail::map_result_t< R, Operation &, T > > | map (Operation &&op) const |
| Aleph::DynList< Aleph::dry_detail::map_result_t< R, Operation &, T > > | map_if (Prop prop, Operation &op) const |
| Aleph::DynList< Aleph::dry_detail::map_result_t< R, Operation &, T > > | map_if (Prop prop, Operation &&op) const |
| template<class Operation > requires Aleph::InvocableWith<Operation &, const T &> | |
| auto | flat_map (Operation &op) const |
| Map each element to a container and concatenate the results. | |
| template<class Operation > requires Aleph::InvocableWith<Operation &, const T &> | |
| auto | flat_map (Operation &&op) const |
| Overload of flat_map() that accepts rvalues. | |
| Aleph::DynList< T > | to_dynlist () const |
| Convert container to DynList. | |
| std::vector< T > | to_vector () const |
| Convert container to std::vector. | |
| template<typename Acc = T, class Op > requires Aleph::dry_detail::FoldOperation<Op, Acc, T> | |
| Acc | foldl (const Acc &init, Op &op) const |
| Fold the elements of the container to a specific result. | |
| template<typename Acc = T, class Op > requires Aleph::dry_detail::FoldOperation<Op, Acc, T> | |
| Acc | foldl (const Acc &init, Op &&op) const |
| Overload of foldl() that accepts rvalues. | |
| template<typename Acc = T, class Op > requires Aleph::dry_detail::FoldOperation<Op, Acc, T> | |
| Acc | fold_left (const Acc &init, Op &op) const |
| Alias for foldl(). | |
| template<typename Acc = T, class Op > requires Aleph::dry_detail::FoldOperation<Op, Acc, T> | |
| Acc | fold_left (const Acc &init, Op &&op) const |
| Overload of fold_left() that accepts rvalues. | |
| template<class Operation > requires Aleph::dry_detail::FoldOperation<Operation, T, T> | |
| T | fold (const T &init, Operation &operation) const |
| Simplified version of foldl() where the folded type is the same type of elements stored in the container. | |
| template<class Operation > requires Aleph::dry_detail::FoldOperation<Operation, T, T> | |
| T | fold (const T &init, Operation &&operation) const |
| Overload of fold() that accepts rvalues. | |
| template<typename Acc = T, class Op > requires Aleph::dry_detail::FoldRightOperation<Op, Acc, T> | |
| Acc | foldr (const Acc &init, Op &op) const |
| Fold the elements from the last to the first. | |
| template<typename Acc = T, class Op > requires Aleph::dry_detail::FoldRightOperation<Op, Acc, T> | |
| Acc | foldr (const Acc &init, Op &&op) const |
| Overload of foldr() that accepts rvalues. | |
| template<class Op , class U = T> requires Aleph::dry_detail::FoldOperation<Op, T, T> | |
| and std::copy_constructible< U > std::optional< T > | reduce (Op &op) const |
| Fold the elements with no initial value. | |
| template<class Op , class U = T> requires Aleph::dry_detail::FoldOperation<Op, T, T> | |
| and std::copy_constructible< U > std::optional< T > | reduce (Op &&op) const |
| Overload of reduce() that accepts rvalues. | |
| template<class Operation > requires Aleph::InvocablePredicateWith<Operation &, const T &> | |
| Aleph::DynList< T > | filter (Operation &operation) const |
| Filter the elements of a container according to a matching criterion. | |
| template<class Operation > requires Aleph::InvocablePredicateWith<Operation &, const T &> | |
| Aleph::DynList< T > | filter (Operation &&operation) const |
| Overload of filter() that accepts rvalues. | |
| template<class Operation > requires Aleph::InvocablePredicateWith<Operation &, const T &> | |
| Aleph::DynList< const T * > | ptr_filter (Operation &operation) const |
| Filter the elements of a container according to a matching criterion and return a pointer to the matched items in the container. | |
| template<class Operation > requires Aleph::InvocablePredicateWith<Operation &, const T &> | |
| Aleph::DynList< const T * > | ptr_filter (Operation &&operation) const |
| Overload of ptr_filter() that accepts rvalues. | |
| template<class Operation > requires Aleph::InvocablePredicateWith<Operation &, const T &> | |
| Aleph::DynList< std::tuple< T, size_t > > | pfilter (Operation &operation) const |
| Filter the elements of a container according to a matching criterion and determine its positions respect to the traversal of container. | |
| template<class Operation > requires Aleph::InvocablePredicateWith<Operation &, const T &> | |
| Aleph::DynList< std::tuple< T, size_t > > | pfilter (Operation &&operation) const |
| Overload of pfilter() that accepts rvalues. | |
| template<class Operation > requires Aleph::InvocablePredicateWith<Operation &, const T &> | |
| std::pair< Aleph::DynList< T >, Aleph::DynList< T > > | partition (Operation &op) const |
| Exclusive partition of container according to a filter criterion. | |
| template<class Operation > requires Aleph::InvocablePredicateWith<Operation &, const T &> | |
| std::pair< Aleph::DynList< T >, Aleph::DynList< T > > | partition (Operation &&op) const |
| Overload of partition() that accepts rvalues. | |
| std::pair< Aleph::DynList< T >, Aleph::DynList< T > > | partition (size_t n) const |
| Exclusive partition of container in the nth item. | |
| std::pair< Aleph::DynList< T >, Aleph::DynList< T > > | split_half () const |
| Split the container into two halves by alternating elements. | |
| template<class Operation > requires Aleph::InvocablePredicateWith<Operation &, const T &> | |
| std::tuple< Aleph::DynList< T >, Aleph::DynList< T > > | tpartition (Operation &op) const |
| Exclusive partition of container according to a filter criterion. | |
| template<class Operation > requires Aleph::InvocablePredicateWith<Operation &, const T &> | |
| std::tuple< Aleph::DynList< T >, Aleph::DynList< T > > | tpartition (Operation &&op) const |
| Overload of tpartition() that accepts rvalues. | |
| size_t | length () const noexcept(Aleph::dry_detail::const_traversal_is_noexcept< Container, T >) |
| Count the number of elements of a container. | |
| Aleph::DynList< T > | rev () const |
| Return a list with the elements of container in reverse order respect to its traversal order. | |
| Aleph::DynList< T > | take (const size_t n) const |
| Return a list with the first n elements seen in the container during its traversal. | |
| Aleph::DynList< T > | take (size_t i, const size_t j, const size_t step=1) const |
Return a list with the elements at positions i, i + step, i + 2 step, ... that are not greater than j, respect to the traversal order. | |
| Aleph::DynList< T > | drop (const size_t n) const |
| Drop the first n elements seen in the container during its traversal. | |
| template<class Operation > requires Aleph::InvocablePredicateWith<Operation &, const T &> | |
| Aleph::DynList< T > | take_while (Operation &op) const |
| The longest prefix of elements that satisfy a criterion. | |
| template<class Operation > requires Aleph::InvocablePredicateWith<Operation &, const T &> | |
| Aleph::DynList< T > | take_while (Operation &&op) const |
| Overload of take_while() that accepts rvalues. | |
| template<class Operation > requires Aleph::InvocablePredicateWith<Operation &, const T &> | |
| Aleph::DynList< T > | drop_while (Operation &op) const |
| The elements after the longest prefix that satisfies a criterion. | |
| template<class Operation > requires Aleph::InvocablePredicateWith<Operation &, const T &> | |
| Aleph::DynList< T > | drop_while (Operation &&op) const |
| Overload of drop_while() that accepts rvalues. | |
| template<class C = Container> requires requires (C & c) { c.remove(); } | |
| void | mutable_drop (const size_t n) |
| Drop the first n elements seen from container. | |
Public Member Functions inherited from EqualToMethod< Container > | |
| template<class C = Container> requires Aleph::dry_detail::SetSearchable<C> | |
| bool | equal_to (const Container &r) const |
Test if elements of this are exactly contained in another container. | |
Public Member Functions inherited from StlAlephIterator< SetName > | |
| iterator | begin () noexcept |
| Return an STL-compatible iterator to the first element. | |
| iterator | end () noexcept |
| Return an STL-compatible end iterator. | |
| const_iterator | begin () const noexcept |
| Return a const iterator to the first element. | |
| const_iterator | end () const noexcept |
| Return a const end iterator. | |
| const_iterator | cbegin () const noexcept |
| Return a const iterator to the first element. | |
| const_iterator | cend () const noexcept |
| Return a const end iterator. | |
Static Public Member Functions | |
| static Bucket * | key_to_bucket (Key *rec) noexcept |
Static Public Member Functions inherited from FunctionalMethods< Container, T > | |
| template<typename... Items> requires ((std::convertible_to<Items &&, T> and ...) and (Aleph::AppendableWith<typename Aleph::concepts_detail::defer<Container, std::tuple<Items...>>::type, Item_Arg<Items>> and ...)) | |
| static Container | build (Items &&... items) |
| Build a container that holds the given items. | |
| template<class D , typename... Items> requires (std::derived_from<D, typename Aleph::concepts_detail::defer<Container, D>::type> and std::default_initializable<D> and (std::convertible_to<Items &&, T> and ...) and (Aleph::AppendableWith<typename Aleph::concepts_detail::defer<Container, std::tuple<D, Items...>>::type, Item_Arg<Items>> and ...)) | |
| static D | build_as (Items &&... items) |
Build a D, a class derived from the container, holding the given items. | |
Public Attributes | |
| Bucket * | table = nullptr |
| size_t | N = 0 |
Public Attributes inherited from FunctionalMethods< Container, T > | |
| template<typename... Args> requires (typename Aleph::concepts_detail::defer<Container, std::tuple<Args...>>::type & c, T && x) | |
| and { c.append(std::move(x)) | |
| Insert a new element into the container by constructing it from the given args. | |
| template<typename R = void, class Prop , class Operation > requires (Aleph::DynList<Aleph::dry_detail::map_result_t<R, Operation &, T>> & l, Operation & op, const T & item) | |
| and Aleph::InvocableWith< Operation &, const T & > | and { l.append(std::invoke(op, item)) |
| Conditional mapping of the elements of the container. | |
Protected Member Functions | |
| Bucket * | occupy (Bucket *bucket) noexcept |
Gives bucket, empty or the one of a removed key, to a new key. | |
| Bucket * | allocate_bucket (const Key &key) noexcept |
| std::tuple< Bucket *, bool > | hard_allocate_bucket (const Key &key) noexcept |
| size_t | prev_index (const size_t i) const noexcept |
| Index of previous bucket (handles wrap-around) | |
| size_t | next_index (const size_t i) const noexcept |
| Index of next bucket (handles wrap-around) | |
| void | cleanup_deleted_chain (size_t idx) noexcept |
| Cleanup DELETED entries that are at the end of collision chains. | |
| void | deallocate_bucket (Bucket *bucket) noexcept |
Removes the key of bucket, a busy bucket of the table. | |
| void | undo_allocate_bucket (Bucket *bucket, const Key &) noexcept |
Undoes what allocate_bucket() or hard_allocate_bucket() did when they reserved bucket for a key that is not to stay in it. | |
Protected Member Functions inherited from OhashCommon< HashTbl, Key > | |
| void | rebuild (const size_t new_len) |
Places the keys of the table in new_len new buckets. | |
| size_t | rebuild_capacity () const |
| Capacity to rebuild a table that resizes itself with, when its buckets in use are too many. | |
| size_t | capacity_after_insertion () const |
| Capacity that an insertion leaves the table with, or 0 if it keeps it. | |
| void | shrink_after_removal () noexcept |
| Shrinks a table that resizes itself, after a removal took its load factor under the lower threshold. | |
Protected Attributes | |
| size_t | len |
| float | lower_alpha |
| float | upper_alpha |
| Cmp | cmp |
Private Member Functions | |
| bool | is_valid_bucket (Bucket *bucket) const noexcept |
| Key * | test_resize (Bucket *curr_bucket, const Key &key) |
| Key * | rebuild_after_insertion (Bucket *curr_bucket, const Key &key, const size_t new_len) |
Static Private Member Functions | |
| static void | update_stat_len (DynArray< size_t > &lens, size_t i) |
Private Attributes | |
| Hash_Fct | hash_fct |
| bool | with_resize |
| size_t | deleted_buckets = 0 |
Friends | |
| class | OhashCommon< OLhashTable< Key, Cmp >, Key > |
Open addressing hash table with linear probing collision resolution.
This class implements a closed hash table (contiguous memory array) that resolves collisions using linear probing. When a collision occurs, consecutive buckets are checked sequentially until an empty slot is found.
Linear probing has better cache locality than double hashing but may suffer from primary clustering. It is simpler and often faster for small to medium-sized tables.
| Key | The type of keys stored in the table. |
| Cmp | Comparison functor for keys (default: Aleph::equal_to<Key>). Must return true if two keys are equal. |
set_hash_fct() places the stored keys again with the new function, as rehash() does: on a table that is not empty it takes O(n).Definition at line 168 of file tpl_olhash.H.
| using Aleph::OLhashTable< Key, Cmp >::Base = OhashCommon<OLhashTable<Key, Cmp>, Key> |
Definition at line 268 of file tpl_olhash.H.
| using Aleph::OLhashTable< Key, Cmp >::Hash_Fct = std::function<size_t(const Key &)> |
Definition at line 184 of file tpl_olhash.H.
| using Aleph::OLhashTable< Key, Cmp >::Hash_Fct_Ptr = size_t (*)(const Key &) |
Definition at line 186 of file tpl_olhash.H.
| using Aleph::OLhashTable< Key, Cmp >::Item_Type = Key |
Definition at line 182 of file tpl_olhash.H.
| using Aleph::OLhashTable< Key, Cmp >::Key_Type = Key |
Definition at line 180 of file tpl_olhash.H.
| using Aleph::OLhashTable< Key, Cmp >::Stats = typename OhashCommon<OLhashTable<Key, Cmp>, Key>::Stats |
Definition at line 704 of file tpl_olhash.H.
| enum Aleph::OLhashTable::Status |
| Enumerator | |
|---|---|
| EMPTY | |
| BUSY | |
| DELETED | |
Definition at line 188 of file tpl_olhash.H.
|
inline |
Instantiate a hash table with hash function __hash_fct and dimension len.
It throws overflow_error if the bytes of that many buckets do not fit in a size_t.
Definition at line 255 of file tpl_olhash.H.
References Aleph::OLhashTable< Key, Cmp >::len, and Aleph::OLhashTable< Key, Cmp >::table.
|
inline |
Definition at line 264 of file tpl_olhash.H.
|
inline |
Definition at line 272 of file tpl_olhash.H.
|
inline |
Definition at line 281 of file tpl_olhash.H.
|
inline |
Constructor with two hash functions for metaprogramming compatibility with ODhashTable type.
Definition at line 289 of file tpl_olhash.H.
|
inline |
Builds a table whose hash function is a lambda without captures.
A lambda without captures converts both to Hash_Fct and to Hash_Fct_Ptr, so with every parameter given it fitted two constructors and the call was ambiguous. This one takes it as it is.
| [in] | len | Requested capacity; the next prime is used. |
| [in] | hash_fct | Lambda without captures, or another object that converts to Hash_Fct_Ptr. |
| [in] | cmp | Equality comparator for keys. |
| [in] | lower_alpha | Load factor under which the table shrinks. |
| [in] | upper_alpha | Load factor over which the table grows. |
| [in] | with_resize | Whether the table resizes itself. |
| std::bad_alloc | If there is no memory for the buckets. |
Definition at line 312 of file tpl_olhash.H.
|
inline |
Builds a table from two hash functions when one of them is a lambda without captures.
It takes the same parameters as ODhashTable; the second hash function is not used. See the constructor above for the reason why a lambda without captures needs an overload of its own.
| [in] | len | Requested capacity; the next prime is used. |
| [in] | hash_fct | Hash function. |
| [in] | cmp | Equality comparator for keys. |
| [in] | lower_alpha | Load factor under which the table shrinks. |
| [in] | upper_alpha | Load factor over which the table grows. |
| [in] | with_resize | Whether the table resizes itself. |
| std::bad_alloc | If there is no memory for the buckets. |
Definition at line 337 of file tpl_olhash.H.
|
inline |
Definition at line 342 of file tpl_olhash.H.
|
inline |
Definition at line 342 of file tpl_olhash.H.
|
inline |
Definition at line 342 of file tpl_olhash.H.
|
inline |
Release all occupied memory.
Definition at line 345 of file tpl_olhash.H.
References Aleph::OLhashTable< Key, Cmp >::table.
|
inline |
Copy constructor.
The copy has the keys, the hash function, the comparator, the load thresholds and the resizing policy of other, and its capacity. A table whose storage was taken by a move is copied as a table of the default capacity.
| [in] | other | Table to copy. |
| std::bad_alloc | If there is no memory for the buckets. |
Definition at line 385 of file tpl_olhash.H.
References OhashCommon< HashTbl, Key >::copy_from_table().
|
inlinenoexcept |
Move constructor.
Takes the buckets of other in constant time and without allocating them. The new table also gets a copy of the hash function, the comparator, the load thresholds and the resizing policy, which other keeps.
| [in,out] | other | Table to take the keys from. It is left empty, with capacity zero. It is still usable: the first insertion gives it a table of the default capacity. |
std::terminate is called. A function pointer and a comparator without state never throw. Definition at line 408 of file tpl_olhash.H.
|
inlineprotectednoexcept |
Definition at line 492 of file tpl_olhash.H.
References Aleph::OLhashTable< Key, Cmp >::BUSY, Aleph::OLhashTable< Key, Cmp >::cmp, Aleph::OLhashTable< Key, Cmp >::EMPTY, Aleph::OLhashTable< Key, Cmp >::hash_fct, Aleph::OLhashTable< Key, Cmp >::len, Aleph::OLhashTable< Key, Cmp >::occupy(), and Aleph::OLhashTable< Key, Cmp >::table.
|
inlineprotectednoexcept |
Cleanup DELETED entries that are at the end of collision chains.
If the bucket at idx has a following EMPTY bucket, it can be marked EMPTY instead of DELETED. Then propagate backwards to clean any DELETED buckets that now also end in EMPTY. This implements Knuth's optimization to avoid tombstone accumulation.
Definition at line 581 of file tpl_olhash.H.
References FunctionalMethods< Container, T >::and, Aleph::count(), Aleph::OLhashTable< Key, Cmp >::DELETED, Aleph::OLhashTable< Key, Cmp >::deleted_buckets, Aleph::OLhashTable< Key, Cmp >::EMPTY, Aleph::OLhashTable< Key, Cmp >::len, Aleph::OLhashTable< Key, Cmp >::next_index(), Aleph::OLhashTable< Key, Cmp >::prev_index(), Aleph::OLhashTable< Key, Cmp >::Bucket::status, and Aleph::OLhashTable< Key, Cmp >::table.
Referenced by Aleph::OLhashTable< Key, Cmp >::deallocate_bucket(), and Aleph::OLhashTable< Key, Cmp >::remove().
|
inlineconstexprnoexcept |
|
inlineprotectednoexcept |
Removes the key of bucket, a busy bucket of the table.
The callers make sure of it: remove_ptr() checks the bucket first, and Iterator::del() passes the one of its current key.
Definition at line 607 of file tpl_olhash.H.
References FunctionalMethods< Container, T >::and, Aleph::OLhashTable< Key, Cmp >::BUSY, Aleph::OLhashTable< Key, Cmp >::cleanup_deleted_chain(), Aleph::OLhashTable< Key, Cmp >::DELETED, Aleph::OLhashTable< Key, Cmp >::deleted_buckets, Aleph::OLhashTable< Key, Cmp >::is_valid_bucket(), Aleph::OLhashTable< Key, Cmp >::N, Aleph::OLhashTable< Key, Cmp >::Bucket::status, and Aleph::OLhashTable< Key, Cmp >::table.
|
inlineconstexprnoexcept |
Definition at line 246 of file tpl_olhash.H.
References Aleph::OLhashTable< Key, Cmp >::cmp.
|
inlineconstexprnoexcept |
Definition at line 248 of file tpl_olhash.H.
References Aleph::OLhashTable< Key, Cmp >::cmp.
|
inlinenoexcept |
Definition at line 702 of file tpl_olhash.H.
|
inlineprotectednoexcept |
Definition at line 530 of file tpl_olhash.H.
References Aleph::OLhashTable< Key, Cmp >::BUSY, Aleph::OLhashTable< Key, Cmp >::cmp, Aleph::OLhashTable< Key, Cmp >::EMPTY, Aleph::OLhashTable< Key, Cmp >::hash_fct, Aleph::OLhashTable< Key, Cmp >::len, Aleph::OLhashTable< Key, Cmp >::occupy(), and Aleph::OLhashTable< Key, Cmp >::table.
|
inlineprivatenoexcept |
Definition at line 226 of file tpl_olhash.H.
References StlAlephIterator< SetName >::begin(), StlAlephIterator< SetName >::end(), Aleph::OLhashTable< Key, Cmp >::len, and Aleph::OLhashTable< Key, Cmp >::table.
Referenced by Aleph::OLhashTable< Key, Cmp >::deallocate_bucket(), and Aleph::OLhashTable< Key, Cmp >::undo_allocate_bucket().
|
inlinestaticnoexcept |
Definition at line 202 of file tpl_olhash.H.
References offset.
|
inlineprotectednoexcept |
Index of next bucket (handles wrap-around)
Definition at line 571 of file tpl_olhash.H.
References Aleph::OLhashTable< Key, Cmp >::len.
Referenced by Aleph::OLhashTable< Key, Cmp >::cleanup_deleted_chain(), and Aleph::OLhashTable< Key, Cmp >::undo_allocate_bucket().
|
inlineprotectednoexcept |
Gives bucket, empty or the one of a removed key, to a new key.
Definition at line 483 of file tpl_olhash.H.
References Aleph::OLhashTable< Key, Cmp >::BUSY, Aleph::OLhashTable< Key, Cmp >::DELETED, Aleph::OLhashTable< Key, Cmp >::deleted_buckets, Aleph::OLhashTable< Key, Cmp >::N, and Aleph::OLhashTable< Key, Cmp >::Bucket::status.
Referenced by Aleph::OLhashTable< Key, Cmp >::allocate_bucket(), and Aleph::OLhashTable< Key, Cmp >::hard_allocate_bucket().
|
inline |
Copy assignment.
Leaves this table as a copy of other: the same keys, hash function, comparator, load thresholds, resizing policy and capacity.
| [in] | other | Table to copy. |
| std::bad_alloc | If there is no memory for the copy. This table is left as it was. |
Definition at line 430 of file tpl_olhash.H.
References Aleph::OLhashTable< Key, Cmp >::swap().
|
inlinenoexcept |
Definition at line 441 of file tpl_olhash.H.
References Aleph::OLhashTable< Key, Cmp >::swap().
|
inlineprotectednoexcept |
Index of previous bucket (handles wrap-around)
Definition at line 565 of file tpl_olhash.H.
References Aleph::OLhashTable< Key, Cmp >::len.
Referenced by Aleph::OLhashTable< Key, Cmp >::cleanup_deleted_chain(), and Aleph::OLhashTable< Key, Cmp >::undo_allocate_bucket().
|
inlineprivate |
Definition at line 702 of file tpl_olhash.H.
|
inline |
Remove the key referenced by key.
key must be a valid reference to the key previously inserted or retrieved in the table. If the key is not in the table, then a domain_error exception is thrown. A table that resizes itself may then shrink, as with remove_ptr(), so that its keys move.
Definition at line 672 of file tpl_olhash.H.
References ah_domain_error, ah_domain_error_if, FunctionalMethods< Container, T >::and, Aleph::OLhashTable< Key, Cmp >::BUSY, Aleph::OLhashTable< Key, Cmp >::cleanup_deleted_chain(), Aleph::OLhashTable< Key, Cmp >::cmp, Aleph::OLhashTable< Key, Cmp >::DELETED, Aleph::OLhashTable< Key, Cmp >::deleted_buckets, Aleph::OLhashTable< Key, Cmp >::EMPTY, Aleph::OLhashTable< Key, Cmp >::hash_fct, Aleph::OLhashTable< Key, Cmp >::len, Aleph::OLhashTable< Key, Cmp >::N, OhashCommon< HashTbl, Key >::shrink_after_removal(), Aleph::OLhashTable< Key, Cmp >::Bucket::status, and Aleph::OLhashTable< Key, Cmp >::table.
Referenced by TEST().
|
inlinenoexcept |
Finds the key and returns the associated record if key is find inside the table; otherwise, nullptr is returned.
Definition at line 456 of file tpl_olhash.H.
References FunctionalMethods< Container, T >::and, Aleph::OLhashTable< Key, Cmp >::BUSY, Aleph::OLhashTable< Key, Cmp >::cmp, Aleph::OLhashTable< Key, Cmp >::EMPTY, Aleph::OLhashTable< Key, Cmp >::hash_fct, Aleph::OLhashTable< Key, Cmp >::len, and Aleph::OLhashTable< Key, Cmp >::table.
|
inlinenoexcept |
|
inline |
Definition at line 702 of file tpl_olhash.H.
|
inline |
Definition at line 702 of file tpl_olhash.H.
|
inline |
Definition at line 706 of file tpl_olhash.H.
References FunctionalMethods< Container, T >::and, Aleph::OLhashTable< Key, Cmp >::BUSY, Aleph::OLhashTable< Key, Cmp >::cmp, Aleph::count(), Aleph::OLhashTable< Key, Cmp >::DELETED, Aleph::OLhashTable< Key, Cmp >::deleted_buckets, Aleph::OLhashTable< Key, Cmp >::EMPTY, Aleph::OLhashTable< Key, Cmp >::hash_fct, Aleph::OLhashTable< Key, Cmp >::Bucket::key, Aleph::OLhashTable< Key, Cmp >::len, Aleph::DynArray< T >::size(), Aleph::OLhashTable< Key, Cmp >::stats(), Aleph::sum(), Aleph::OLhashTable< Key, Cmp >::table, and Aleph::OLhashTable< Key, Cmp >::update_stat_len().
Referenced by Aleph::OLhashTable< Key, Cmp >::stats(), and TEST().
|
inlinenoexcept |
Swaps this table with other in constant time.
The keys travel with everything that rules them: the hash function, the comparator, the load thresholds and the resizing policy.
| [in,out] | other | Table to swap with. |
std::terminate is called. Definition at line 362 of file tpl_olhash.H.
References Aleph::OLhashTable< Key, Cmp >::cmp, Aleph::OLhashTable< Key, Cmp >::deleted_buckets, Aleph::OLhashTable< Key, Cmp >::hash_fct, Aleph::OLhashTable< Key, Cmp >::len, Aleph::OLhashTable< Key, Cmp >::lower_alpha, hash_dry_detail::swap_compare(), Aleph::OLhashTable< Key, Cmp >::table, Aleph::OLhashTable< Key, Cmp >::upper_alpha, and Aleph::OLhashTable< Key, Cmp >::with_resize.
Referenced by Aleph::OLhashTable< Key, Cmp >::operator=(), Aleph::OLhashTable< Key, Cmp >::operator=(), and TEST().
|
inlineprivate |
Definition at line 702 of file tpl_olhash.H.
|
inlineprotectednoexcept |
Undoes what allocate_bucket() or hard_allocate_bucket() did when they reserved bucket for a key that is not to stay in it.
The bucket was empty or the one of a removed key. It stays marked as removed only if a key stored after it, in the same run of buckets that are not empty, was placed by a probe sequence that went through it; otherwise it is empty again, and so are the removed keys' buckets right before it. An empty bucket is never lost: the searches that reached it stop there as before.
Definition at line 627 of file tpl_olhash.H.
References FunctionalMethods< Container, T >::and, Aleph::OLhashTable< Key, Cmp >::BUSY, Aleph::count(), Aleph::OLhashTable< Key, Cmp >::DELETED, Aleph::OLhashTable< Key, Cmp >::deleted_buckets, Aleph::OLhashTable< Key, Cmp >::EMPTY, Aleph::OLhashTable< Key, Cmp >::hash_fct, Aleph::OLhashTable< Key, Cmp >::is_valid_bucket(), Aleph::OLhashTable< Key, Cmp >::Bucket::key, Aleph::OLhashTable< Key, Cmp >::len, Aleph::OLhashTable< Key, Cmp >::N, Aleph::OLhashTable< Key, Cmp >::next_index(), Aleph::OLhashTable< Key, Cmp >::prev_index(), Aleph::OLhashTable< Key, Cmp >::Bucket::status, steps, and Aleph::OLhashTable< Key, Cmp >::table.
|
inlinestaticprivate |
Definition at line 702 of file tpl_olhash.H.
Referenced by Aleph::OLhashTable< Key, Cmp >::stats().
|
friend |
Definition at line 1 of file tpl_olhash.H.
|
protected |
Definition at line 218 of file tpl_olhash.H.
Referenced by Aleph::OLhashTable< Key, Cmp >::allocate_bucket(), Aleph::OLhashTable< Key, Cmp >::get_compare(), Aleph::OLhashTable< Key, Cmp >::get_compare(), Aleph::OLhashTable< Key, Cmp >::hard_allocate_bucket(), Aleph::OLhashTable< Key, Cmp >::remove(), Aleph::OLhashTable< Key, Cmp >::search(), Aleph::OLhashTable< Key, Cmp >::stats(), and Aleph::OLhashTable< Key, Cmp >::swap().
|
private |
Definition at line 224 of file tpl_olhash.H.
Referenced by Aleph::OLhashTable< Key, Cmp >::cleanup_deleted_chain(), Aleph::OLhashTable< Key, Cmp >::deallocate_bucket(), Aleph::OLhashTable< Key, Cmp >::occupy(), Aleph::OLhashTable< Key, Cmp >::remove(), Aleph::OLhashTable< Key, Cmp >::stats(), Aleph::OLhashTable< Key, Cmp >::swap(), and Aleph::OLhashTable< Key, Cmp >::undo_allocate_bucket().
|
private |
Definition at line 222 of file tpl_olhash.H.
Referenced by Aleph::OLhashTable< Key, Cmp >::allocate_bucket(), Aleph::OLhashTable< Key, Cmp >::hard_allocate_bucket(), Aleph::OLhashTable< Key, Cmp >::remove(), Aleph::OLhashTable< Key, Cmp >::search(), Aleph::OLhashTable< Key, Cmp >::stats(), Aleph::OLhashTable< Key, Cmp >::swap(), and Aleph::OLhashTable< Key, Cmp >::undo_allocate_bucket().
|
protected |
Definition at line 215 of file tpl_olhash.H.
Referenced by Aleph::OLhashTable< Key, Cmp >::OLhashTable(), Aleph::OLhashTable< Key, Cmp >::allocate_bucket(), Aleph::OLhashTable< Key, Cmp >::cleanup_deleted_chain(), Aleph::OLhashTable< Key, Cmp >::hard_allocate_bucket(), Aleph::OLhashTable< Key, Cmp >::is_valid_bucket(), Aleph::OLhashTable< Key, Cmp >::next_index(), Aleph::OLhashTable< Key, Cmp >::prev_index(), Aleph::OLhashTable< Key, Cmp >::remove(), Aleph::OLhashTable< Key, Cmp >::search(), Aleph::OLhashTable< Key, Cmp >::stats(), Aleph::OLhashTable< Key, Cmp >::swap(), and Aleph::OLhashTable< Key, Cmp >::undo_allocate_bucket().
|
protected |
Definition at line 216 of file tpl_olhash.H.
Referenced by Aleph::OLhashTable< Key, Cmp >::swap().
| size_t Aleph::OLhashTable< Key, Cmp >::N = 0 |
Definition at line 211 of file tpl_olhash.H.
Referenced by Aleph::OLhashTable< Key, Cmp >::deallocate_bucket(), Aleph::OLhashTable< Key, Cmp >::occupy(), Aleph::OLhashTable< Key, Cmp >::remove(), and Aleph::OLhashTable< Key, Cmp >::undo_allocate_bucket().
| Bucket* Aleph::OLhashTable< Key, Cmp >::table = nullptr |
Definition at line 210 of file tpl_olhash.H.
Referenced by Aleph::OLhashTable< Key, Cmp >::OLhashTable(), Aleph::OLhashTable< Key, Cmp >::~OLhashTable(), Aleph::OLhashTable< Key, Cmp >::allocate_bucket(), Aleph::OLhashTable< Key, Cmp >::cleanup_deleted_chain(), Aleph::OLhashTable< Key, Cmp >::deallocate_bucket(), Aleph::OLhashTable< Key, Cmp >::hard_allocate_bucket(), Aleph::OLhashTable< Key, Cmp >::is_valid_bucket(), Aleph::OLhashTable< Key, Cmp >::remove(), Aleph::OLhashTable< Key, Cmp >::search(), Aleph::OLhashTable< Key, Cmp >::stats(), Aleph::OLhashTable< Key, Cmp >::swap(), and Aleph::OLhashTable< Key, Cmp >::undo_allocate_bucket().
|
protected |
Definition at line 217 of file tpl_olhash.H.
Referenced by Aleph::OLhashTable< Key, Cmp >::swap().
|
private |
Definition at line 223 of file tpl_olhash.H.
Referenced by Aleph::OLhashTable< Key, Cmp >::swap().