libbf  0.1
 All Classes Functions Typedefs Friends Pages
bitwise.h
1 #ifndef BF_BLOOM_FILTER_BITWISE_H
2 #define BF_BLOOM_FILTER_BITWISE_H
3 
4 #include <bf/bloom_filter/basic.h>
5 
6 namespace bf {
7 
10 {
11 public:
16  bitwise_bloom_filter(size_t k, size_t cells, size_t seed = 0);
17 
18  using bloom_filter::add;
20 
21  virtual void add(object const& o) override;
22  virtual size_t lookup(object const& o) const override;
23  virtual void clear() override;
24 
25 private:
28  void grow();
29 
30  size_t k_;
31  size_t cells_;
32  size_t seed_;
33  std::vector<basic_bloom_filter> levels_;
34 };
35 
36 } // namespace bf
37 
38 #endif