MCPcopy Create free account
hub / github.com/BirolLab/RNA-Bloom / getFPR

Method getFPR

src/rnabloom/bloom/BloomFilter.java:184–194  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

182 }
183
184 @Override
185 public float getFPR() {
186 /* (1 - e(-kn/m))^k
187 k = num hash
188 m = size
189 n = pop count
190 */
191
192 popcount = bitArray.popCount();
193 return (float) pow((double)(popcount) / (double)(size), numHash);
194 }
195
196 public static long getExpectedSize(long expNumElements, float fpr, int numHash) {
197 double r = (double) (-numHash) / log(1 - exp(log(fpr) / (double) numHash));

Callers 3

restoreGraphMethod · 0.95
saveMethod · 0.95
minimalSetMethod · 0.95

Calls 1

popCountMethod · 0.45

Tested by

no test coverage detected