libbf  0.1
 All Classes Functions Typedefs Friends Pages
stable.h
1 #ifndef BF_BLOOM_FILTER_STABLE_H
2 #define BF_BLOOM_FILTER_STABLE_H
3 
4 #include <random>
5 #include <bf/bloom_filter/counting.h>
6 
7 namespace bf {
8 
11 {
12 public:
19  stable_bloom_filter(hasher h, size_t cells, size_t width, size_t d);
20 
25  virtual void add(object const& o) override;
26 
27  using bloom_filter::add;
29 
30 private:
31  size_t d_;
32  std::mt19937 generator_;
33  std::uniform_int_distribution<> unif_;
34 };
35 
36 } // namespace bf
37 
38 #endif