Commit dd9f6f0 Ankit Gupta
committed
1 parent 7a5106f commit dd9f6f0 Copy full SHA for dd9f6f0
File tree 2 files changed +8
-8
lines changed
2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change 10
10
* with approximately the specified number of bits per key.
11
11
* A good value for bitsPerKey is 10, which yields a filter
12
12
* with ~ 1% false positive rate.
13
- *
13
+ *
14
14
* Default value of bits per key is 10.
15
15
*/
16
16
public class BloomFilter extends Filter {
17
17
private static final int DEFAULT_BITS_PER_KEY = 10 ;
18
18
private final int bitsPerKey_ ;
19
-
19
+
20
20
public BloomFilter () {
21
21
this (DEFAULT_BITS_PER_KEY );
22
22
}
23
-
23
+
24
24
public BloomFilter (int bitsPerKey ) {
25
25
super ();
26
26
bitsPerKey_ = bitsPerKey ;
27
-
27
+
28
28
createNewFilter ();
29
29
}
30
-
30
+
31
31
@ Override
32
32
protected void createNewFilter () {
33
33
createNewFilter0 (bitsPerKey_ );
34
34
}
35
-
35
+
36
36
private native void createNewFilter0 (int bitsKeyKey );
37
- }
37
+ }
Original file line number Diff line number Diff line change 14
14
*/
15
15
public abstract class Filter {
16
16
protected long nativeHandle_ = 0 ;
17
-
17
+
18
18
protected abstract void createNewFilter ();
19
19
20
20
/**
You can’t perform that action at this time.
0 commit comments