1 /* ----------------------------------------------------------------------------
2  * This file was automatically generated by SWIG (http://www.swig.org).
3  * Version 4.0.2
4  *
5  * Do not make changes to this file unless you know what you are doing--modify
6  * the SWIG interface file instead.
7  * ----------------------------------------------------------------------------- */
8 
9 package btllib;
10 
11 public class BloomFilter {
12   private transient long swigCPtr;
13   protected transient boolean swigCMemOwn;
14 
BloomFilter(long cPtr, boolean cMemoryOwn)15   protected BloomFilter(long cPtr, boolean cMemoryOwn) {
16     swigCMemOwn = cMemoryOwn;
17     swigCPtr = cPtr;
18   }
19 
getCPtr(BloomFilter obj)20   protected static long getCPtr(BloomFilter obj) {
21     return (obj == null) ? 0 : obj.swigCPtr;
22   }
23 
24   @SuppressWarnings("deprecation")
finalize()25   protected void finalize() {
26     delete();
27   }
28 
delete()29   public synchronized void delete() {
30     if (swigCPtr != 0) {
31       if (swigCMemOwn) {
32         swigCMemOwn = false;
33         btllibJNI.delete_BloomFilter(swigCPtr);
34       }
35       swigCPtr = 0;
36     }
37   }
38 
BloomFilter()39   public BloomFilter() {
40     this(btllibJNI.new_BloomFilter__SWIG_0(), true);
41   }
42 
BloomFilter(long bytes, long hash_num)43   public BloomFilter(long bytes, long hash_num) {
44     this(btllibJNI.new_BloomFilter__SWIG_1(bytes, hash_num), true);
45   }
46 
BloomFilter(String path)47   public BloomFilter(String path) {
48     this(btllibJNI.new_BloomFilter__SWIG_2(path), true);
49   }
50 
insert(SWIGTYPE_p_uint64_t hashes)51   public void insert(SWIGTYPE_p_uint64_t hashes) {
52     btllibJNI.BloomFilter_insert__SWIG_0(swigCPtr, this, SWIGTYPE_p_uint64_t.getCPtr(hashes));
53   }
54 
insert(SWIGTYPE_p_std__vectorT_uint64_t_t hashes)55   public void insert(SWIGTYPE_p_std__vectorT_uint64_t_t hashes) {
56     btllibJNI.BloomFilter_insert__SWIG_1(swigCPtr, this, SWIGTYPE_p_std__vectorT_uint64_t_t.getCPtr(hashes));
57   }
58 
contains(SWIGTYPE_p_uint64_t hashes)59   public boolean contains(SWIGTYPE_p_uint64_t hashes) {
60     return btllibJNI.BloomFilter_contains__SWIG_0(swigCPtr, this, SWIGTYPE_p_uint64_t.getCPtr(hashes));
61   }
62 
contains(SWIGTYPE_p_std__vectorT_uint64_t_t hashes)63   public boolean contains(SWIGTYPE_p_std__vectorT_uint64_t_t hashes) {
64     return btllibJNI.BloomFilter_contains__SWIG_1(swigCPtr, this, SWIGTYPE_p_std__vectorT_uint64_t_t.getCPtr(hashes));
65   }
66 
get_bytes()67   public long get_bytes() {
68     return btllibJNI.BloomFilter_get_bytes(swigCPtr, this);
69   }
70 
get_pop_cnt()71   public SWIGTYPE_p_uint64_t get_pop_cnt() {
72     return new SWIGTYPE_p_uint64_t(btllibJNI.BloomFilter_get_pop_cnt(swigCPtr, this), true);
73   }
74 
get_occupancy()75   public double get_occupancy() {
76     return btllibJNI.BloomFilter_get_occupancy(swigCPtr, this);
77   }
78 
get_hash_num()79   public long get_hash_num() {
80     return btllibJNI.BloomFilter_get_hash_num(swigCPtr, this);
81   }
82 
get_fpr()83   public double get_fpr() {
84     return btllibJNI.BloomFilter_get_fpr(swigCPtr, this);
85   }
86 
write(String path)87   public void write(String path) {
88     btllibJNI.BloomFilter_write(swigCPtr, this, path);
89   }
90 
parse_header(SWIGTYPE_p_std__ifstream file, String magic_string)91   public static SWIGTYPE_p_std__shared_ptrT_cpptoml__table_t parse_header(SWIGTYPE_p_std__ifstream file, String magic_string) {
92     return new SWIGTYPE_p_std__shared_ptrT_cpptoml__table_t(btllibJNI.BloomFilter_parse_header(SWIGTYPE_p_std__ifstream.getCPtr(file), magic_string), true);
93   }
94 
95 }
96