The bitwise Bloom filter. More...
#include <bitwise.h>

Public Member Functions | |
| bitwise_bloom_filter (size_t k, size_t cells, size_t seed=0) | |
| Constructs a bitwise Bloom filter. More... | |
| virtual void | add (object const &o) override |
| Adds an element to the Bloom filter. More... | |
| virtual size_t | lookup (object const &o) const override |
| Retrieves the count of an element. More... | |
| virtual void | clear () override |
| Removes all items from the Bloom filter. | |
Public Member Functions inherited from bf::bloom_filter | |
| template<typename T > | |
| void | add (T const &x) |
| Adds an element to the Bloom filter. More... | |
| template<typename T > | |
| size_t | lookup (T const &x) const |
| Retrieves the count of an element. More... | |
Private Member Functions | |
| void | grow () |
| Appends a new level. More... | |
Private Attributes | |
| size_t | k_ |
| size_t | cells_ |
| size_t | seed_ |
| std::vector< basic_bloom_filter > | levels_ |
| bf::bitwise_bloom_filter::bitwise_bloom_filter | ( | size_t | k, |
| size_t | cells, | ||
| size_t | seed = 0 |
||
| ) |
Constructs a bitwise Bloom filter.
| k | The number of hash functions in the first level. |
| cells0 | The number of cells in the the first level. |
| seed0 | The seed for the first level. |
Definition at line 5 of file bitwise.cc.
References grow().

|
overridevirtual |
Adds an element to the Bloom filter.
| o | A wrapped object. |
Implements bf::bloom_filter.
Definition at line 11 of file bitwise.cc.
References grow(), and lookup().

|
private |
Appends a new level.
levels_.size() += 1 Definition at line 44 of file bitwise.cc.
Referenced by add(), bitwise_bloom_filter(), and clear().

|
overridevirtual |
Retrieves the count of an element.
| o | A wrapped object. |
Implements bf::bloom_filter.
Definition at line 30 of file bitwise.cc.
Referenced by add().

1.8.3.1