Claudenw commented on code in PR #402:
URL:
https://github.com/apache/commons-collections/pull/402#discussion_r1256018727
##########
src/main/java/org/apache/commons/collections4/bloomfilter/Shape.java:
##########
@@ -227,6 +227,15 @@ public double estimateN(final int cardinality) {
return -(m / k) * Math.log1p(-c / m);
}
+ /**
+ * Estimates the maximum number of elements that can be merged into a
filter of this shape before
Review Comment:
text has been changed to read:
Estimates the maximum number of elements that can be merged into a filter of
* this shape before the false positive rate exceeds the desired rate.
<p> The
* formula for deriving {@code k} when {@code m} and {@code n} are known
is:
*
* <pre>
* k = ln2 * m / n
* </pre>
*
* solving for {@code n} yields:
*
* <pre>
* n = ln2 * m / k
* </pre>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]