apache / datasketches-java

A software library of stochastic streaming algorithms, a.k.a. sketches.
https://datasketches.apache.org
Apache License 2.0
893 stars 209 forks source link

JaccardSimilarity#jaccard can throw #153

Closed hpx7 closed 7 years ago

hpx7 commented 7 years ago

See https://github.com/DataSketches/sketches-core/blob/master/src/main/java/com/yahoo/sketches/theta/JaccardSimilarity.java#L46

This fails if ceilingPowerOf2(countA + countB)) is not between the accepted range for nominal entires.

I'm happy to submit a PR with the fix + test, but didn't see any contribution guidelines.

leerho commented 7 years ago

Thank you for finding this. It will be fixed in the next release, which is coming (hopefully) in the next few days. It is fixed on master.