Template Class PartitionedBloomFilter

Class Documentation

template<class T, class H = std::hash<T>>
class PartitionedBloomFilter

a filter of Bloom of r parts of m / r bits, a hash for each part

Public Functions

PartitionedBloomFilter(std::size_t m, int r, H h = H())

the empty filter of about m bits in r parts

Pre:

r >= 1 and m >= r

void insert(const T &x)
Post:

maybe( x )

bool maybe(const T &x) const

false only if x was never inserted

std::size_t ones(void) const

the bits set

std::size_t bits(void) const

the bits, r times those of a part