|
libBf 0.1
|
The stable Bloom filter. More...
#include <bloom_filter_stable.h>

Public Types | |
| typedef base::core_type | core_type |
Public Member Functions | |
| stable (core_type &&core, const generator_type &generator, unsigned d) | |
| Create a spectral Bloom filter. | |
| template<typename T > | |
| void | add (const T &x) |
| Add an item to the stable Bloom filter. | |
| template<typename T > | |
| void | remove (const T &x) |
| Remove an item from the set. | |
Private Types | |
| typedef Generator | generator_type |
| typedef basic< Core > | base |
Private Attributes | |
| generator_type | generator_ |
| Generates randomness out of thin air. | |
| unsigned | d_ |
| Number of cells to decrement at add. | |
The stable Bloom filter.
Definition at line 13 of file bloom_filter_stable.h.
| bf::stable< Core, Generator >::stable | ( | core_type && | core, |
| const generator_type & | generator, | ||
| unsigned | d | ||
| ) | [inline] |
Create a spectral Bloom filter.
| core | An rvalue reference to a core. |
| generator | An lvalue reference to a randomness generator. |
| d | The number of cells to decrement at each insert |
Definition at line 25 of file bloom_filter_stable.h.
| void bf::stable< Core, Generator >::add | ( | const T & | x | ) | [inline] |
Add an item to the stable Bloom filter.
This invovles (i) decrementing k positions uniformly at random and (ii) setting the counter of the value x to its maximum value, i.e., all 1's.
Reimplemented from bf::basic< Core >.
Definition at line 37 of file bloom_filter_stable.h.
References bf::stable< Core, Generator >::d_, and bf::stable< Core, Generator >::generator_.
| void bf::stable< Core, Generator >::remove | ( | const T & | x | ) |
Remove an item from the set.
| T | The type of the item to delete. |
| x | An instance of type T. |
Reimplemented from bf::basic< Core >.
1.7.3