Bloom Filter
A BloomFilter is a conservative, probabilistic set. It can report that an element is probably in the set, or definitely not in the set. This can be a useful, fast prefilter to avoid computing or fetching authoritative data in a large majority of cases, effectively reducing the number of spurious occurrences of the slower activity by orders of magnitude.
Since the filter is probabilistic, the interface is defined entirely in terms of Ints, under the assumption that the actual entity being tested for membership has already been hashed.
Author
Mark van Gulik
Constructors
Construct a new instance that initially reports false for every membership test. If a non-null existingFilter is provided, it is copied instead.
Copy an existing BloomFilter.
Functions
Add an Int element to the BloomFilter.
Add all elements of the given BloomFilter to the receiver. The array size and hashCount of the given filter should match that of the receiver.