There are things that have been committed.

This commit is contained in:
Jacob Signorovitch
2025-03-03 08:22:14 -05:00
parent 98fb817c80
commit 9bb38875bb

View File

@@ -1,5 +1,6 @@
package bloom_filters; package bloom_filters;
import java.util.Random;
import tester.Tester; import tester.Tester;
class BitVec { class BitVec {
@@ -23,7 +24,16 @@ class BitVec {
} }
class Hash { class Hash {
static // Create k hash functions.
static int[] hash(Object o, int k, int m) {
Random rand = new Random(o.hashCode());
int[] ret = new int[k];
for (int i = 0; i < k; i++) ret[i] = rand.nextInt(m);
return ret;
}
} }
class Examples { class Examples {