BloomFilter

constructor(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 (currently up to a multiple of 64).

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).


constructor(existingFilter: BloomFilter<T>)

Copy an existing BloomFilter.

Parameters

existingFilter

The BloomFilter to copy.


constructor(binaryStream: DataInputStream)

Reconstruct a BloomFilter previously written by write.

Parameters

binaryStream

The DataInputStream from which to perform the reconstruction.