Algorithms_in_C++ 1.0.0
Set of algorithms implemented in C++.
|
Bloom filter template class. More...
Public Member Functions | |
BloomFilter (std::size_t, std::initializer_list< std::function< std::size_t(T)> >) | |
Constructor for Bloom filter. | |
void | add (T) |
Add function for Bloom filter. | |
bool | contains (T) |
Check element function for Bloom filter. | |
Private Attributes | |
Bitset | set |
inner bitset for elements | |
std::vector< std::function< std::size_t(T)> > | hashFunks |
hash functions for T type | |
Bloom filter template class.
T | type of elements that we need to filter |
data_structures::BloomFilter< T >::BloomFilter | ( | std::size_t | size, |
std::initializer_list< std::function< std::size_t(T)> > | funks ) |
Constructor for Bloom filter.
T | type of elements that we need to filter |
size | initial size of Bloom filter |
funks | hash functions for T type |
void data_structures::BloomFilter< T >::add | ( | T | x | ) |
Add function for Bloom filter.
T | type of elements that we need to filter |
x | element to add to filter |
bool data_structures::BloomFilter< T >::contains | ( | T | x | ) |
Check element function for Bloom filter.
T | type of elements that we need to filter |
x | element to check in filter |