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
Parameters
The type of objects hashed into the filter.
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.
Reconstruct a BloomFilter previously written by write.
Properties
Functions
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.
Add an Int, the hashCode of some element, to the BloomFilter.
Write this BloomFilter onto the given stream, such that the constructor taking a DataInputStream can reconstruct it.