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

Method add

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

Source from the content-addressed store, hash-verified

36 }
37
38 public void add(long key) {
39 long hash = Hash.hash64(key, seed);
40 long a = (hash >>> 32) | (hash << 32);
41 long b = hash;
42 for (int i = 0; i < k; i++) {
43 data[Hash.reduce((int) (a >>> 32), arraySize)] |= 1L << a;
44 a += b;
45 }
46 }
47
48 public boolean mayContain(long key) {
49 long hash = Hash.hash64(key, seed);

Callers 14

constructMethod · 0.95
mainMethod · 0.80
mainMethod · 0.80
mainMethod · 0.80
mainMethod · 0.80
mainMethod · 0.80
constructMethod · 0.80
constructMethod · 0.80
constructMethod · 0.80
searchMethod · 0.80
searchMethod · 0.80
searchMethod · 0.80

Calls 2

hash64Method · 0.95
reduceMethod · 0.95

Tested by 5

mainMethod · 0.64
mainMethod · 0.64
mainMethod · 0.64
mainMethod · 0.64
mainMethod · 0.64