BloomFilter

fun BloomFilter(bitCount: Int, hashCount: Int)

Construct a new instance that initially reports false for every membership test. If a non-null existingFilter is provided, it is copied instead.

Parameters

bitCount

The number of bits that can be set independently in the table. This number may be rounded up to a convenient size.

hashCount

The number of hash functions to apply for each element. Each hash function rehashes the given value (an Int), and requires the corresponding bit position to contain a 1 bit if the element is present (but they may all happen to be 1 even if the element is not present).


fun BloomFilter(existingFilter: BloomFilter)

Copy an existing BloomFilter.

Parameters

existingFilter

The BloomFilter to copy.