Bloom filter for time series keys.
More...
#include <bloom_filter.h>
|
|
| BloomFilter ()=delete |
| | Deleted default constructor.
|
| |
| | BloomFilter (std::string &&str) noexcept |
| | Construct a new BloomFilter object from the given string.
|
| |
| | BloomFilter (uint64_t expected_no_of_elems, double false_positive_rate) |
| | Construct a new BloomFilter object from the given expected number of elements and false positive rate.
|
| |
|
| ~BloomFilter () noexcept=default |
| | Destroy the BloomFilter object.
|
| |
|
| BloomFilter (BloomFilter &&) noexcept=default |
| | Move-construct a BloomFilter object.
|
| |
|
BloomFilter & | operator= (BloomFilter &&) noexcept=default |
| | Move-assign a BloomFilter object.
|
| |
|
| BloomFilter (const BloomFilter &)=delete |
| | Deleted copy constructor.
|
| |
|
BloomFilter & | operator= (const BloomFilter &)=delete |
| | Deleted copy assignment operator.
|
| |
| void | insert (const key_type &key) noexcept |
| | Insert a key into the Bloom filter.
|
| |
| bool | mayContain (const key_type &key) const noexcept |
| | Check if the Bloom filter may contain a key.
|
| |
| std::string | str () const noexcept |
| | Get the string representation of the Bloom filter.
|
| |
Bloom filter for time series keys.
Definition at line 16 of file bloom_filter.h.
◆ key_type
◆ size_type
| using vkdb::BloomFilter::size_type = uint64_t |
◆ BloomFilter() [1/2]
| vkdb::BloomFilter::BloomFilter |
( |
std::string && | str | ) |
|
|
noexcept |
Construct a new BloomFilter object from the given string.
- Parameters
-
| str | The string representation of the Bloom filter. |
Definition at line 5 of file bloom_filter.cpp.
◆ BloomFilter() [2/2]
| vkdb::BloomFilter::BloomFilter |
( |
uint64_t | expected_no_of_elems, |
|
|
double | false_positive_rate ) |
|
explicit |
Construct a new BloomFilter object from the given expected number of elements and false positive rate.
- Parameters
-
| expected_no_of_elems | The expected number of elements. |
| false_positive_rate | The false positive rate. |
- Exceptions
-
| std::invalid_argument | If the expected number of elements is zero or the false positive rate is not in range (MIN_FALSE_POSITIVE_RATE, MAX_FALSE_POSITIVE_RATE). |
Definition at line 25 of file bloom_filter.cpp.
◆ insert()
| void vkdb::BloomFilter::insert |
( |
const key_type & | key | ) |
|
|
noexcept |
Insert a key into the Bloom filter.
- Parameters
-
Definition at line 55 of file bloom_filter.cpp.
◆ mayContain()
| bool vkdb::BloomFilter::mayContain |
( |
const key_type & | key | ) |
const |
|
nodiscardnoexcept |
Check if the Bloom filter may contain a key.
- Parameters
-
- Returns
- true if the Bloom filter may contain the key.
-
false if the Bloom filter does not contain the key.
Definition at line 61 of file bloom_filter.cpp.
◆ str()
| std::string vkdb::BloomFilter::str |
( |
| ) |
const |
|
nodiscardnoexcept |
Get the string representation of the Bloom filter.
- Returns
- std::string The string representation of the Bloom filter.
Definition at line 70 of file bloom_filter.cpp.
◆ MAX_FALSE_POSITIVE_RATE
| double vkdb::BloomFilter::MAX_FALSE_POSITIVE_RATE {1.0} |
|
staticconstexpr |
Maximum (exclusive) false positive rate.
Definition at line 31 of file bloom_filter.h.
◆ MIN_FALSE_POSITIVE_RATE
| double vkdb::BloomFilter::MIN_FALSE_POSITIVE_RATE {0.0} |
|
staticconstexpr |
Minimum (exclusive) false positive rate.
Definition at line 25 of file bloom_filter.h.
The documentation for this class was generated from the following files: