MCPcopy Index your code
hub / github.com/CDSecLab/MJXT / mayContain

Method mayContain

src/main/java/utils/Bloom.java:48–59  ·  view source on GitHub ↗
(long key)

Source from the content-addressed store, hash-verified

46 }
47
48 public boolean mayContain(long key) {
49 long hash = Hash.hash64(key, seed);
50 long a = (hash >>> 32) | (hash << 32);
51 long b = hash;
52 for (int i = 0; i < k; i++) {
53 if ((data[Hash.reduce((int) (a >>> 32), arraySize)] & 1L << a) == 0) {
54 return false;
55 }
56 a += b;
57 }
58 return true;
59 }
60
61 public byte[][] getData() {
62 byte[][] d = new byte[data.length][];

Callers 5

searchMethod · 0.80
searchMethod · 0.80
searchMethod · 0.80
searchMethod · 0.80
searchMethod · 0.80

Calls 2

hash64Method · 0.95
reduceMethod · 0.95

Tested by

no test coverage detected