aldsalkjf
This commit is contained in:
@@ -2,6 +2,33 @@ package bloom_filters;
|
||||
|
||||
import tester.Tester;
|
||||
|
||||
class Examples {
|
||||
void testTheThing(Tester t) { t.checkExpect(true, true); }
|
||||
class BitVec {
|
||||
boolean[] vec;
|
||||
|
||||
BitVec(int m) {
|
||||
if (m < 0)
|
||||
throw new IllegalArgumentException("Must be positive integer.");
|
||||
|
||||
this.vec = new boolean[m];
|
||||
}
|
||||
|
||||
// Get the value of the ith bit.
|
||||
boolean get(int i) { return this.vec[i]; }
|
||||
|
||||
// Set the value of the ith bit.
|
||||
void set(int i, boolean v) { this.vec[i] = v; }
|
||||
|
||||
// Flip the ith bit.
|
||||
void flip(int i) { this.vec[i] = !this.vec[i]; }
|
||||
}
|
||||
|
||||
class Hash {
|
||||
static
|
||||
}
|
||||
|
||||
class Examples {
|
||||
void testTheThing(Tester t) {
|
||||
t.checkExpect(true, true);
|
||||
t.checkExpect(false, false);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user