MCPcopy Create free account
hub / github.com/CDSecLab/MJXT / Bloom

Method Bloom

src/main/java/utils/Bloom.java:29–36  ·  view source on GitHub ↗
(int entryCount, double bitsPerKey, int k)

Source from the content-addressed store, hash-verified

27 private final long[] data;
28
29 Bloom(int entryCount, double bitsPerKey, int k) {
30 entryCount = Math.max(1, entryCount);
31 this.k = k;
32 this.seed = Hash.randomSeed();
33 this.bits = (long) (entryCount * bitsPerKey);
34 arraySize = (int) ((bits + 63) / 64);
35 data = new long[arraySize];
36 }
37
38 public void add(long key) {
39 long hash = Hash.hash64(key, seed);

Callers

nothing calls this directly

Calls 1

randomSeedMethod · 0.95

Tested by

no test coverage detected