Template Class BloomFilter
Defined in File BloomFilter.h
Class Documentation
-
template<class T, class H = std::hash<T>>
class BloomFilter a filter of Bloom of m bits and k hashes
Public Functions
-
BloomFilter(std::size_t m, int k, H h = H())
the empty filter of m bits and k hashes
- Pre:
m >= 1 and k >= 1
-
double falsePositiveRate(void) const
the expected false positives after the insertions made
-
std::size_t bits(void) const
-
int hashes(void) const
Public Static Functions
-
static BloomFilter forItems(std::size_t n, double p)
the filter of the best k for n items and the false positives p
- Pre:
n >= 1 and 0 < p < 1
-
BloomFilter(std::size_t m, int k, H h = H())