Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Added some more javadoc
  • Loading branch information
Bcpoole committed Feb 9, 2017
commit ea554a632f46d66503a1f78624498cfdba3fc3e6
Original file line number Diff line number Diff line change
Expand Up @@ -157,12 +157,16 @@ int getVersionNumber() {
* Unlike mergeInplace, this will not cause a mutation.
* Callers must ensure the bloom filters are appropriately sized to avoid saturating them.
*
* @throws IncompatibleUnionException if either are null, different classes, or different size or number of hash functions
* @param other The bloom filter to union this bloom filter with.
* @throws IncompatibleUnionException if {@code isCompatible(other) == false}
*/
public abstract BloomFilterImpl union(BloomFilter other) throws IncompatibleUnionException;

/**
* Swamidass & Baldi (2007) approximation for number of items in the intersection of two Bloom filters
Copy link
Contributor

@mengxr mengxr Feb 10, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Same here. Document the method first and then mention the reference.
  • How is it different from intersecting two bloom filters and then estimate the number of items? Union might lead to larger approximation error. Okay, I got why. Please also document it.

*
* @param other The bloom filter to intersect this bloom filter with.
* @throws IncompatibleUnionException if {@code isCompatible(other) == false}
*/
public abstract double approxItemsInIntersection(BloomFilter that) throws IncompatibleUnionException;

Expand Down