We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents e0c82f7 + 348b533 commit 9f7887aCopy full SHA for 9f7887a
commons/src/main/java/org/archive/util/BloomFilter64bit.java
@@ -80,7 +80,7 @@ public BloomFilter64bit( final long n, final int d, boolean roundUp) {
80
* @param roundUp if true, round bit size up to next-nearest-power-of-2
81
*/
82
public BloomFilter64bit(final long n, final int d, Random weightsGenerator, boolean roundUp ) {
83
- delegate = com.google.common.hash.BloomFilter.create(Funnels.unencodedCharsFunnel(), Ints.saturatedCast(n), 0.0000003);
+ delegate = com.google.common.hash.BloomFilter.create(Funnels.unencodedCharsFunnel(), Ints.saturatedCast(n), Math.pow(2, -d));
84
this.expectedInserts = n;
85
try {
86
Method bitSizeMethod = delegate.getClass().getDeclaredMethod("bitSize", new Class[] {});
0 commit comments