|
Aleph-w 7.10.0
A C++ Library for Data Structures and Algorithms
|
Memory-optimized quotient filter with bit-packed slots. More...
#include <compact-quotient-filter.H>
Public Member Functions | |
| Compact_Quotient_Filter (uint8_t q, uint8_t r, uint32_t seed=0x5F3759DF) | |
| Construct a compact quotient filter. | |
| Compact_Quotient_Filter (const Compact_Quotient_Filter &other)=default | |
| Copy the parameters and the slots of another filter. | |
| Compact_Quotient_Filter (Compact_Quotient_Filter &&other) | |
| Take the elements of another filter, which is left as an empty filter of two slots (q = 1), with its remainder bits and seed. | |
| Compact_Quotient_Filter & | operator= (const Compact_Quotient_Filter &other)=default |
| Copy the parameters and the slots of another filter. | |
| Compact_Quotient_Filter & | operator= (Compact_Quotient_Filter &&other) noexcept |
| Exchange this filter with another, which is left with the previous state of this one. | |
| Compact_Quotient_Filter & | insert (const T &item) |
| Insert an element. | |
| bool | contains (const T &item) const noexcept |
| Test membership. | |
| bool | remove (const T &item) noexcept |
| Remove an element. | |
| size_t | size () const noexcept |
| Number of elements. | |
| size_t | capacity () const noexcept |
| Number of slots (2^q). | |
| double | load_factor () const noexcept |
| Current load factor. | |
| bool | is_empty () const noexcept |
| True if empty. | |
| uint8_t | q () const noexcept |
| Quotient bits. | |
| uint8_t | r () const noexcept |
| Remainder bits. | |
| double | false_positive_rate () const noexcept |
| Theoretical FP probability ~ 2^{-r}. | |
| uint32_t | seed () const noexcept |
| Hash seed. | |
| size_t | memory_usage () const noexcept |
| Memory usage in bytes. | |
| void | clear () noexcept |
| Remove all elements. | |
| void | merge (const Compact_Quotient_Filter &other) |
| Merge another filter (same q, r, seed). | |
| void | swap (Compact_Quotient_Filter &other) noexcept |
| Swap in O(1). | |
Static Public Member Functions | |
| static Compact_Quotient_Filter | from_capacity (size_t expected_n, double fp_rate, uint32_t seed=0x5F3759DF) |
| Construct from desired capacity and false positive rate. | |
| static std::pair< uint8_t, uint8_t > | estimate (size_t n, double fp_rate) |
The quotient and the remainder bits of a filter for n elements and a target FP rate. | |
Private Types | |
| enum class | Insert_Result { inserted , duplicate , full } |
Private Member Functions | |
| size_t | bits_per_slot () const noexcept |
| size_t | slot_offset (const size_t i) const noexcept |
| uint64_t | rem_mask () const noexcept |
| bool | get_bit_at (const size_t slot, const size_t bit_idx) const noexcept |
| void | set_bit_at (const size_t slot, const size_t bit_idx, const bool v) noexcept |
| bool | get_occ (const size_t i) const noexcept |
| bool | get_cont (const size_t i) const noexcept |
| bool | get_shft (const size_t i) const noexcept |
| bool | slot_empty (const size_t i) const noexcept |
| bool | has_element (const size_t i) const noexcept |
| bool | is_run_start (const size_t i) const noexcept |
| void | set_occ (const size_t i, const bool v) noexcept |
| void | set_cont (const size_t i, const bool v) noexcept |
| void | set_shft (const size_t i, const bool v) noexcept |
| uint64_t | get_rem (const size_t i) const noexcept |
| void | set_rem (const size_t i, const uint64_t rem) noexcept |
| void | set_element (const size_t i, const bool cont, const bool shft, const uint64_t rem) noexcept |
| void | clear_element (const size_t i) noexcept |
| size_t | incr (const size_t i) const noexcept |
| size_t | decr (const size_t i) const noexcept |
| std::pair< size_t, uint64_t > | fingerprint (const T &item) const |
| size_t | find_run_start (const size_t fq) const noexcept |
| size_t | find_first_unused (const size_t start) const noexcept |
| void | shift_elements_right (const size_t pos, size_t empty) noexcept |
| bool | holds (const size_t fq, const uint64_t fr) const noexcept |
| template<class Op > | |
| void | for_each_fingerprint (Op op) const |
| Insert_Result | do_insert (const size_t fq, const uint64_t fr) |
| void | shift_elements_left (const size_t pos, size_t quot, bool promote) noexcept |
Private Attributes | |
| uint8_t | q_ |
| uint8_t | r_ |
| size_t | num_slots_ |
| size_t | num_elems_ |
| uint32_t | seed_ |
| BitArray | bits_ |
Memory-optimized quotient filter with bit-packed slots.
| T | Element type. Must be hashable via murmur3hash(T, seed). |
std::vector copies these objects instead of moving them: their move constructor is not noexcept, because it leaves the source empty and usable, which allocates, and std::vector moves only what cannot throw. DynList holds them without relocating them, so it never copies them; Array and DynArray cannot hold them, as they build their items by default and these objects have no default constructor. Definition at line 92 of file compact-quotient-filter.H.
|
strongprivate |
| Enumerator | |
|---|---|
| inserted | |
| duplicate | |
| full | |
Definition at line 322 of file compact-quotient-filter.H.
|
inline |
Construct a compact quotient filter.
| [in] | q | Number of quotient bits (2^q slots). Must be in [1, 32]. |
| [in] | r | Remainder bits per slot (FP rate ~ 2^{-r}). Must be in [1, 60]. |
| [in] | seed | Hash seed (default: 0x5F3759DF). |
| std::domain_error | if q or r are out of range, or q + r > 64. |
Definition at line 436 of file compact-quotient-filter.H.
References ah_domain_error_if, Aleph::Compact_Quotient_Filter< T >::bits_, Aleph::Compact_Quotient_Filter< T >::bits_per_slot(), Aleph::Compact_Quotient_Filter< T >::num_slots_, Aleph::Compact_Quotient_Filter< T >::q(), Aleph::Compact_Quotient_Filter< T >::r(), and Aleph::BitArray::reserve().
|
default |
Copy the parameters and the slots of another filter.
| [in] | other | filter to copy. |
| std::bad_alloc | if the slots cannot be allocated. |
|
inline |
Take the elements of another filter, which is left as an empty filter of two slots (q = 1), with its remainder bits and seed.
The implicit move took the bits but copied the count of slots: the moved-from filter then read bits that it no longer had, through checked accesses in functions that are noexcept. With two slots, every operation of other works as in any filter, with no test for a filter without slots.
| [in,out] | other | filter to move from. |
| std::bad_alloc | if the slots left to other cannot be allocated; other is then unchanged. |
other. Definition at line 471 of file compact-quotient-filter.H.
References Aleph::Compact_Quotient_Filter< T >::swap().
|
inlineprivatenoexcept |
Definition at line 113 of file compact-quotient-filter.H.
References Aleph::Compact_Quotient_Filter< T >::r_.
Referenced by Aleph::Compact_Quotient_Filter< T >::Compact_Quotient_Filter(), Aleph::Compact_Quotient_Filter< T >::clear(), Aleph::Compact_Quotient_Filter< T >::memory_usage(), Aleph::Compact_Quotient_Filter< T >::slot_empty(), and Aleph::Compact_Quotient_Filter< T >::slot_offset().
|
inlinenoexcept |
Number of slots (2^q).
O(1).
Definition at line 589 of file compact-quotient-filter.H.
References Aleph::Compact_Quotient_Filter< T >::num_slots_.
Referenced by example_basic_usage(), and TEST().
|
inlinenoexcept |
Remove all elements.
O(2^q).
Definition at line 637 of file compact-quotient-filter.H.
References Aleph::Compact_Quotient_Filter< T >::bits_, Aleph::Compact_Quotient_Filter< T >::bits_per_slot(), Aleph::BitArray::fast_write(), Aleph::Compact_Quotient_Filter< T >::num_elems_, and Aleph::Compact_Quotient_Filter< T >::num_slots_.
|
inlineprivatenoexcept |
Definition at line 213 of file compact-quotient-filter.H.
References Aleph::Compact_Quotient_Filter< T >::get_occ(), Aleph::Compact_Quotient_Filter< T >::set_cont(), Aleph::Compact_Quotient_Filter< T >::set_occ(), Aleph::Compact_Quotient_Filter< T >::set_rem(), and Aleph::Compact_Quotient_Filter< T >::set_shft().
Referenced by Aleph::Compact_Quotient_Filter< T >::shift_elements_left().
|
inlinenoexcept |
Test membership.
May return false positives (~2^{-r}), never false negatives.
Definition at line 537 of file compact-quotient-filter.H.
References Aleph::Compact_Quotient_Filter< T >::fingerprint(), and Aleph::Compact_Quotient_Filter< T >::holds().
Referenced by example_basic_usage(), example_cache_admission(), example_deletion(), example_merge(), example_performance(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), and TEST().
|
inlineprivatenoexcept |
Definition at line 227 of file compact-quotient-filter.H.
References Aleph::Compact_Quotient_Filter< T >::num_slots_.
Referenced by Aleph::Compact_Quotient_Filter< T >::find_run_start(), and Aleph::Compact_Quotient_Filter< T >::shift_elements_right().
|
inlineprivate |
Definition at line 331 of file compact-quotient-filter.H.
References Aleph::Compact_Quotient_Filter< T >::duplicate, Aleph::Compact_Quotient_Filter< T >::find_first_unused(), Aleph::Compact_Quotient_Filter< T >::find_run_start(), Aleph::Compact_Quotient_Filter< T >::full, Aleph::Compact_Quotient_Filter< T >::get_cont(), Aleph::Compact_Quotient_Filter< T >::get_occ(), Aleph::Compact_Quotient_Filter< T >::get_rem(), Aleph::Compact_Quotient_Filter< T >::incr(), Aleph::Compact_Quotient_Filter< T >::inserted, Aleph::Compact_Quotient_Filter< T >::num_elems_, Aleph::Compact_Quotient_Filter< T >::num_slots_, Aleph::Compact_Quotient_Filter< T >::set_cont(), Aleph::Compact_Quotient_Filter< T >::set_element(), Aleph::Compact_Quotient_Filter< T >::set_occ(), Aleph::Compact_Quotient_Filter< T >::set_rem(), Aleph::Compact_Quotient_Filter< T >::shift_elements_right(), and Aleph::Compact_Quotient_Filter< T >::slot_empty().
Referenced by Aleph::Compact_Quotient_Filter< T >::insert(), and Aleph::Compact_Quotient_Filter< T >::merge().
|
inlinestatic |
The quotient and the remainder bits of a filter for n elements and a target FP rate.
The slots are the least power of two that holds n elements at a load of 75 % or less, and the remainder bits are the fewest that give the rate.
| [in] | n | Expected number of elements. |
| [in] | fp_rate | Target false positive probability. |
(q, r), as the constructor takes them. | std::domain_error | if n == 0, if fp_rate is not in (0, 1), or if no filter has the two: the rate asks for more than 60 remainder bits, the elements for more than 2^32 slots, or the two together for more than the 64 bits of the hash. |
Definition at line 704 of file compact-quotient-filter.H.
References ah_domain_error_if, and Aleph::and.
Referenced by Aleph::Compact_Quotient_Filter< T >::from_capacity(), and TEST().
|
inlinenoexcept |
Theoretical FP probability ~ 2^{-r}.
Definition at line 619 of file compact-quotient-filter.H.
References Aleph::Compact_Quotient_Filter< T >::r_.
Referenced by example_basic_usage(), TEST(), TEST(), and TEST().
|
inlineprivatenoexcept |
Definition at line 260 of file compact-quotient-filter.H.
References Aleph::Compact_Quotient_Filter< T >::has_element(), and Aleph::Compact_Quotient_Filter< T >::incr().
Referenced by Aleph::Compact_Quotient_Filter< T >::do_insert().
|
inlineprivatenoexcept |
Definition at line 240 of file compact-quotient-filter.H.
References Aleph::Compact_Quotient_Filter< T >::decr(), Aleph::Compact_Quotient_Filter< T >::get_cont(), Aleph::Compact_Quotient_Filter< T >::get_occ(), Aleph::Compact_Quotient_Filter< T >::get_shft(), and Aleph::Compact_Quotient_Filter< T >::incr().
Referenced by Aleph::Compact_Quotient_Filter< T >::do_insert(), Aleph::Compact_Quotient_Filter< T >::for_each_fingerprint(), Aleph::Compact_Quotient_Filter< T >::holds(), and Aleph::Compact_Quotient_Filter< T >::remove().
|
inlineprivate |
Definition at line 232 of file compact-quotient-filter.H.
References h, Aleph::murmur3hash(), Aleph::Compact_Quotient_Filter< T >::num_slots_, Aleph::Compact_Quotient_Filter< T >::q_, Aleph::Compact_Quotient_Filter< T >::rem_mask(), and Aleph::Compact_Quotient_Filter< T >::seed_.
Referenced by Aleph::Compact_Quotient_Filter< T >::contains(), Aleph::Compact_Quotient_Filter< T >::insert(), and Aleph::Compact_Quotient_Filter< T >::remove().
|
inlineprivate |
Definition at line 306 of file compact-quotient-filter.H.
References Aleph::Compact_Quotient_Filter< T >::find_run_start(), Aleph::Compact_Quotient_Filter< T >::get_cont(), Aleph::Compact_Quotient_Filter< T >::get_occ(), Aleph::Compact_Quotient_Filter< T >::get_rem(), Aleph::Compact_Quotient_Filter< T >::incr(), and Aleph::Compact_Quotient_Filter< T >::num_slots_.
Referenced by Aleph::Compact_Quotient_Filter< T >::merge().
|
inlinestatic |
Construct from desired capacity and false positive rate.
The filter has the quotient and the remainder bits that estimate() gives: slots for expected_n elements at a load of 75 % or less.
| [in] | expected_n | Expected number of elements. |
| [in] | fp_rate | Target false positive probability. |
| [in] | seed | Hash seed. |
| std::domain_error | if expected_n == 0, if fp_rate is not in (0, 1), or if no filter has the two, as estimate() says. |
Definition at line 507 of file compact-quotient-filter.H.
References ah_domain_error_if, Aleph::and, Aleph::Compact_Quotient_Filter< T >::estimate(), and Aleph::Compact_Quotient_Filter< T >::seed().
Referenced by example_from_capacity(), example_url_deduplication(), and TEST().
|
inlineprivatenoexcept |
Definition at line 128 of file compact-quotient-filter.H.
References Aleph::Compact_Quotient_Filter< T >::bits_, Aleph::BitArray::fast_read(), and Aleph::Compact_Quotient_Filter< T >::slot_offset().
Referenced by Aleph::Compact_Quotient_Filter< T >::get_cont(), Aleph::Compact_Quotient_Filter< T >::get_occ(), and Aleph::Compact_Quotient_Filter< T >::get_shft().
|
inlineprivatenoexcept |
Definition at line 143 of file compact-quotient-filter.H.
References Aleph::Compact_Quotient_Filter< T >::get_bit_at().
Referenced by Aleph::Compact_Quotient_Filter< T >::do_insert(), Aleph::Compact_Quotient_Filter< T >::find_run_start(), Aleph::Compact_Quotient_Filter< T >::for_each_fingerprint(), Aleph::Compact_Quotient_Filter< T >::has_element(), Aleph::Compact_Quotient_Filter< T >::holds(), Aleph::Compact_Quotient_Filter< T >::is_run_start(), Aleph::Compact_Quotient_Filter< T >::remove(), Aleph::Compact_Quotient_Filter< T >::shift_elements_left(), and Aleph::Compact_Quotient_Filter< T >::shift_elements_right().
|
inlineprivatenoexcept |
Definition at line 138 of file compact-quotient-filter.H.
References Aleph::Compact_Quotient_Filter< T >::get_bit_at().
Referenced by Aleph::Compact_Quotient_Filter< T >::clear_element(), Aleph::Compact_Quotient_Filter< T >::do_insert(), Aleph::Compact_Quotient_Filter< T >::find_run_start(), Aleph::Compact_Quotient_Filter< T >::for_each_fingerprint(), Aleph::Compact_Quotient_Filter< T >::has_element(), Aleph::Compact_Quotient_Filter< T >::holds(), Aleph::Compact_Quotient_Filter< T >::remove(), Aleph::Compact_Quotient_Filter< T >::set_element(), Aleph::Compact_Quotient_Filter< T >::shift_elements_left(), and Aleph::Compact_Quotient_Filter< T >::shift_elements_right().
|
inlineprivatenoexcept |
Definition at line 187 of file compact-quotient-filter.H.
References Aleph::Compact_Quotient_Filter< T >::bits_, Aleph::BitArray::fast_read(), Aleph::Compact_Quotient_Filter< T >::r_, and Aleph::Compact_Quotient_Filter< T >::slot_offset().
Referenced by Aleph::Compact_Quotient_Filter< T >::do_insert(), Aleph::Compact_Quotient_Filter< T >::for_each_fingerprint(), Aleph::Compact_Quotient_Filter< T >::holds(), Aleph::Compact_Quotient_Filter< T >::remove(), Aleph::Compact_Quotient_Filter< T >::shift_elements_left(), and Aleph::Compact_Quotient_Filter< T >::shift_elements_right().
|
inlineprivatenoexcept |
Definition at line 148 of file compact-quotient-filter.H.
References Aleph::Compact_Quotient_Filter< T >::get_bit_at().
Referenced by Aleph::Compact_Quotient_Filter< T >::find_run_start(), Aleph::Compact_Quotient_Filter< T >::has_element(), and Aleph::Compact_Quotient_Filter< T >::shift_elements_left().
|
inlineprivatenoexcept |
Definition at line 162 of file compact-quotient-filter.H.
References Aleph::Compact_Quotient_Filter< T >::get_cont(), Aleph::Compact_Quotient_Filter< T >::get_occ(), and Aleph::Compact_Quotient_Filter< T >::get_shft().
Referenced by Aleph::Compact_Quotient_Filter< T >::find_first_unused(), Aleph::Compact_Quotient_Filter< T >::is_run_start(), Aleph::Compact_Quotient_Filter< T >::remove(), and Aleph::Compact_Quotient_Filter< T >::shift_elements_left().
|
inlineprivatenoexcept |
Definition at line 286 of file compact-quotient-filter.H.
References Aleph::Compact_Quotient_Filter< T >::find_run_start(), Aleph::Compact_Quotient_Filter< T >::get_cont(), Aleph::Compact_Quotient_Filter< T >::get_occ(), Aleph::Compact_Quotient_Filter< T >::get_rem(), and Aleph::Compact_Quotient_Filter< T >::incr().
Referenced by Aleph::Compact_Quotient_Filter< T >::contains(), and Aleph::Compact_Quotient_Filter< T >::merge().
|
inlineprivatenoexcept |
Definition at line 222 of file compact-quotient-filter.H.
References Aleph::Compact_Quotient_Filter< T >::num_slots_.
Referenced by Aleph::Compact_Quotient_Filter< T >::do_insert(), Aleph::Compact_Quotient_Filter< T >::find_first_unused(), Aleph::Compact_Quotient_Filter< T >::find_run_start(), Aleph::Compact_Quotient_Filter< T >::for_each_fingerprint(), Aleph::Compact_Quotient_Filter< T >::holds(), Aleph::Compact_Quotient_Filter< T >::remove(), and Aleph::Compact_Quotient_Filter< T >::shift_elements_left().
|
inline |
Insert an element.
After insertion, contains(item) is guaranteed true. Duplicates are silently ignored, in a full filter too.
| std::overflow_error | if the filter is full and does not hold the element. |
Definition at line 525 of file compact-quotient-filter.H.
References ah_overflow_error_if, Aleph::Compact_Quotient_Filter< T >::do_insert(), Aleph::Compact_Quotient_Filter< T >::fingerprint(), Aleph::Compact_Quotient_Filter< T >::full, Aleph::Compact_Quotient_Filter< T >::num_elems_, and Aleph::Compact_Quotient_Filter< T >::num_slots_.
Referenced by example_basic_usage(), example_cache_admission(), example_deletion(), example_merge(), example_performance(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), and TEST().
|
inlinenoexcept |
True if empty.
O(1).
Definition at line 601 of file compact-quotient-filter.H.
References Aleph::Compact_Quotient_Filter< T >::num_elems_.
|
inlineprivatenoexcept |
Definition at line 167 of file compact-quotient-filter.H.
References Aleph::and, Aleph::Compact_Quotient_Filter< T >::get_cont(), and Aleph::Compact_Quotient_Filter< T >::has_element().
|
inlinenoexcept |
Current load factor.
O(1).
Definition at line 595 of file compact-quotient-filter.H.
References Aleph::Compact_Quotient_Filter< T >::num_elems_, and Aleph::Compact_Quotient_Filter< T >::num_slots_.
Referenced by example_basic_usage(), TEST(), and TEST().
|
inlinenoexcept |
Memory usage in bytes.
Definition at line 631 of file compact-quotient-filter.H.
References Aleph::Compact_Quotient_Filter< T >::bits_per_slot(), and Aleph::Compact_Quotient_Filter< T >::num_slots_.
Referenced by example_basic_usage(), example_memory_optimization(), example_performance(), TEST(), TEST(), TEST(), and TEST().
|
inline |
Merge another filter (same q, r, seed).
The filter is left with its elements and those of other, each one once: an element that the two hold takes no slot.
It takes O(2^q) on average at the loads that a filter is made for. Each element costs the length of its cluster, so the time grows up to O(4^q) as the filters fill. When the sizes of the two filters say that the elements of other may not fit, they are first looked for in this filter, which is a second pass over other.
| [in] | other | filter whose elements are taken; it is not changed. |
| std::domain_error | on parameter mismatch. |
| std::overflow_error | if the elements of other that this filter does not hold are more than its free slots. The filter is then left as it was. |
Definition at line 662 of file compact-quotient-filter.H.
References ah_domain_error_if, ah_overflow_error_if, Aleph::Compact_Quotient_Filter< T >::do_insert(), Aleph::Compact_Quotient_Filter< T >::for_each_fingerprint(), Aleph::Compact_Quotient_Filter< T >::holds(), Aleph::Compact_Quotient_Filter< T >::num_elems_, Aleph::Compact_Quotient_Filter< T >::num_slots_, Aleph::Compact_Quotient_Filter< T >::q_, Aleph::Compact_Quotient_Filter< T >::r_, and Aleph::Compact_Quotient_Filter< T >::seed_.
Referenced by example_merge(), TEST(), TEST(), TEST(), and TEST().
|
inlinenoexcept |
Exchange this filter with another, which is left with the previous state of this one.
| [in,out] | other | filter to move from. |
Definition at line 490 of file compact-quotient-filter.H.
References Aleph::Compact_Quotient_Filter< T >::swap().
|
default |
Copy the parameters and the slots of another filter.
| [in] | other | filter to copy. |
| std::bad_alloc | if the slots cannot be allocated. |
|
inlinenoexcept |
Quotient bits.
Definition at line 607 of file compact-quotient-filter.H.
References Aleph::Compact_Quotient_Filter< T >::q_.
Referenced by Aleph::Compact_Quotient_Filter< T >::Compact_Quotient_Filter(), TEST(), and TEST().
|
inlinenoexcept |
Remainder bits.
Definition at line 613 of file compact-quotient-filter.H.
References Aleph::Compact_Quotient_Filter< T >::r_.
Referenced by Aleph::Compact_Quotient_Filter< T >::Compact_Quotient_Filter(), example_basic_usage(), TEST(), and TEST().
|
inlineprivatenoexcept |
Definition at line 123 of file compact-quotient-filter.H.
References Aleph::Compact_Quotient_Filter< T >::r_.
Referenced by Aleph::Compact_Quotient_Filter< T >::fingerprint().
|
inlinenoexcept |
Remove an element.
true if the fingerprint was found and removed. Definition at line 547 of file compact-quotient-filter.H.
References Aleph::and, Aleph::Compact_Quotient_Filter< T >::find_run_start(), Aleph::Compact_Quotient_Filter< T >::fingerprint(), Aleph::Compact_Quotient_Filter< T >::get_cont(), Aleph::Compact_Quotient_Filter< T >::get_occ(), Aleph::Compact_Quotient_Filter< T >::get_rem(), Aleph::Compact_Quotient_Filter< T >::has_element(), Aleph::Compact_Quotient_Filter< T >::incr(), Aleph::Compact_Quotient_Filter< T >::num_elems_, Aleph::Compact_Quotient_Filter< T >::set_occ(), and Aleph::Compact_Quotient_Filter< T >::shift_elements_left().
Referenced by example_basic_usage(), example_deletion(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), and TEST().
|
inlinenoexcept |
Hash seed.
Definition at line 625 of file compact-quotient-filter.H.
References Aleph::Compact_Quotient_Filter< T >::seed_.
Referenced by Aleph::Compact_Quotient_Filter< T >::from_capacity().
|
inlineprivatenoexcept |
Definition at line 133 of file compact-quotient-filter.H.
References Aleph::Compact_Quotient_Filter< T >::bits_, Aleph::BitArray::fast_write(), and Aleph::Compact_Quotient_Filter< T >::slot_offset().
Referenced by Aleph::Compact_Quotient_Filter< T >::set_cont(), Aleph::Compact_Quotient_Filter< T >::set_occ(), and Aleph::Compact_Quotient_Filter< T >::set_shft().
|
inlineprivatenoexcept |
Definition at line 177 of file compact-quotient-filter.H.
References Aleph::Compact_Quotient_Filter< T >::set_bit_at().
Referenced by Aleph::Compact_Quotient_Filter< T >::clear_element(), Aleph::Compact_Quotient_Filter< T >::do_insert(), and Aleph::Compact_Quotient_Filter< T >::set_element().
|
inlineprivatenoexcept |
Definition at line 204 of file compact-quotient-filter.H.
References Aleph::Compact_Quotient_Filter< T >::get_occ(), Aleph::Compact_Quotient_Filter< T >::set_cont(), Aleph::Compact_Quotient_Filter< T >::set_occ(), Aleph::Compact_Quotient_Filter< T >::set_rem(), and Aleph::Compact_Quotient_Filter< T >::set_shft().
Referenced by Aleph::Compact_Quotient_Filter< T >::do_insert(), Aleph::Compact_Quotient_Filter< T >::shift_elements_left(), and Aleph::Compact_Quotient_Filter< T >::shift_elements_right().
|
inlineprivatenoexcept |
Definition at line 172 of file compact-quotient-filter.H.
References Aleph::Compact_Quotient_Filter< T >::set_bit_at().
Referenced by Aleph::Compact_Quotient_Filter< T >::clear_element(), Aleph::Compact_Quotient_Filter< T >::do_insert(), Aleph::Compact_Quotient_Filter< T >::remove(), Aleph::Compact_Quotient_Filter< T >::set_element(), Aleph::Compact_Quotient_Filter< T >::shift_elements_left(), and Aleph::Compact_Quotient_Filter< T >::shift_elements_right().
|
inlineprivatenoexcept |
Definition at line 197 of file compact-quotient-filter.H.
References Aleph::Compact_Quotient_Filter< T >::bits_, Aleph::BitArray::fast_write(), Aleph::Compact_Quotient_Filter< T >::r_, and Aleph::Compact_Quotient_Filter< T >::slot_offset().
Referenced by Aleph::Compact_Quotient_Filter< T >::clear_element(), Aleph::Compact_Quotient_Filter< T >::do_insert(), and Aleph::Compact_Quotient_Filter< T >::set_element().
|
inlineprivatenoexcept |
Definition at line 182 of file compact-quotient-filter.H.
References Aleph::Compact_Quotient_Filter< T >::set_bit_at().
Referenced by Aleph::Compact_Quotient_Filter< T >::clear_element(), and Aleph::Compact_Quotient_Filter< T >::set_element().
|
inlineprivatenoexcept |
Definition at line 399 of file compact-quotient-filter.H.
References Aleph::and, Aleph::Compact_Quotient_Filter< T >::clear_element(), Aleph::Compact_Quotient_Filter< T >::get_cont(), Aleph::Compact_Quotient_Filter< T >::get_occ(), Aleph::Compact_Quotient_Filter< T >::get_rem(), Aleph::Compact_Quotient_Filter< T >::get_shft(), Aleph::Compact_Quotient_Filter< T >::has_element(), Aleph::Compact_Quotient_Filter< T >::incr(), Aleph::Compact_Quotient_Filter< T >::set_element(), and Aleph::Compact_Quotient_Filter< T >::set_occ().
Referenced by Aleph::Compact_Quotient_Filter< T >::remove().
|
inlineprivatenoexcept |
Definition at line 268 of file compact-quotient-filter.H.
References Aleph::Compact_Quotient_Filter< T >::decr(), Aleph::Compact_Quotient_Filter< T >::get_cont(), Aleph::Compact_Quotient_Filter< T >::get_occ(), Aleph::Compact_Quotient_Filter< T >::get_rem(), Aleph::Compact_Quotient_Filter< T >::set_element(), and Aleph::Compact_Quotient_Filter< T >::set_occ().
Referenced by Aleph::Compact_Quotient_Filter< T >::do_insert().
|
inlinenoexcept |
Number of elements.
O(1).
Definition at line 583 of file compact-quotient-filter.H.
References Aleph::Compact_Quotient_Filter< T >::num_elems_.
Referenced by example_basic_usage(), example_deletion(), example_merge(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), and TEST().
|
inlineprivatenoexcept |
Definition at line 153 of file compact-quotient-filter.H.
References Aleph::Compact_Quotient_Filter< T >::bits_, Aleph::Compact_Quotient_Filter< T >::bits_per_slot(), Aleph::BitArray::fast_read(), and Aleph::Compact_Quotient_Filter< T >::slot_offset().
Referenced by Aleph::Compact_Quotient_Filter< T >::do_insert().
|
inlineprivatenoexcept |
Definition at line 118 of file compact-quotient-filter.H.
References Aleph::Compact_Quotient_Filter< T >::bits_per_slot().
Referenced by Aleph::Compact_Quotient_Filter< T >::get_bit_at(), Aleph::Compact_Quotient_Filter< T >::get_rem(), Aleph::Compact_Quotient_Filter< T >::set_bit_at(), Aleph::Compact_Quotient_Filter< T >::set_rem(), and Aleph::Compact_Quotient_Filter< T >::slot_empty().
|
inlinenoexcept |
Swap in O(1).
Definition at line 727 of file compact-quotient-filter.H.
References Aleph::Compact_Quotient_Filter< T >::bits_, Aleph::Compact_Quotient_Filter< T >::num_elems_, Aleph::Compact_Quotient_Filter< T >::num_slots_, Aleph::Compact_Quotient_Filter< T >::q_, Aleph::Compact_Quotient_Filter< T >::r_, Aleph::Compact_Quotient_Filter< T >::seed_, and Aleph::BitArray::swap().
Referenced by Aleph::Compact_Quotient_Filter< T >::Compact_Quotient_Filter(), Aleph::Compact_Quotient_Filter< T >::operator=(), and TEST().
|
private |
Definition at line 111 of file compact-quotient-filter.H.
Referenced by Aleph::Compact_Quotient_Filter< T >::Compact_Quotient_Filter(), Aleph::Compact_Quotient_Filter< T >::clear(), Aleph::Compact_Quotient_Filter< T >::get_bit_at(), Aleph::Compact_Quotient_Filter< T >::get_rem(), Aleph::Compact_Quotient_Filter< T >::set_bit_at(), Aleph::Compact_Quotient_Filter< T >::set_rem(), Aleph::Compact_Quotient_Filter< T >::slot_empty(), and Aleph::Compact_Quotient_Filter< T >::swap().
|
private |
Definition at line 97 of file compact-quotient-filter.H.
Referenced by Aleph::Compact_Quotient_Filter< T >::clear(), Aleph::Compact_Quotient_Filter< T >::do_insert(), Aleph::Compact_Quotient_Filter< T >::insert(), Aleph::Compact_Quotient_Filter< T >::is_empty(), Aleph::Compact_Quotient_Filter< T >::load_factor(), Aleph::Compact_Quotient_Filter< T >::merge(), Aleph::Compact_Quotient_Filter< T >::remove(), Aleph::Compact_Quotient_Filter< T >::size(), and Aleph::Compact_Quotient_Filter< T >::swap().
|
private |
Definition at line 96 of file compact-quotient-filter.H.
Referenced by Aleph::Compact_Quotient_Filter< T >::Compact_Quotient_Filter(), Aleph::Compact_Quotient_Filter< T >::capacity(), Aleph::Compact_Quotient_Filter< T >::clear(), Aleph::Compact_Quotient_Filter< T >::decr(), Aleph::Compact_Quotient_Filter< T >::do_insert(), Aleph::Compact_Quotient_Filter< T >::fingerprint(), Aleph::Compact_Quotient_Filter< T >::for_each_fingerprint(), Aleph::Compact_Quotient_Filter< T >::incr(), Aleph::Compact_Quotient_Filter< T >::insert(), Aleph::Compact_Quotient_Filter< T >::load_factor(), Aleph::Compact_Quotient_Filter< T >::memory_usage(), Aleph::Compact_Quotient_Filter< T >::merge(), and Aleph::Compact_Quotient_Filter< T >::swap().
|
private |
Definition at line 94 of file compact-quotient-filter.H.
Referenced by Aleph::Compact_Quotient_Filter< T >::fingerprint(), Aleph::Compact_Quotient_Filter< T >::merge(), Aleph::Compact_Quotient_Filter< T >::q(), and Aleph::Compact_Quotient_Filter< T >::swap().
|
private |
Definition at line 95 of file compact-quotient-filter.H.
Referenced by Aleph::Compact_Quotient_Filter< T >::bits_per_slot(), Aleph::Compact_Quotient_Filter< T >::false_positive_rate(), Aleph::Compact_Quotient_Filter< T >::get_rem(), Aleph::Compact_Quotient_Filter< T >::merge(), Aleph::Compact_Quotient_Filter< T >::r(), Aleph::Compact_Quotient_Filter< T >::rem_mask(), Aleph::Compact_Quotient_Filter< T >::set_rem(), and Aleph::Compact_Quotient_Filter< T >::swap().
|
private |
Definition at line 98 of file compact-quotient-filter.H.
Referenced by Aleph::Compact_Quotient_Filter< T >::fingerprint(), Aleph::Compact_Quotient_Filter< T >::merge(), Aleph::Compact_Quotient_Filter< T >::seed(), and Aleph::Compact_Quotient_Filter< T >::swap().