libBf 0.1
|
The bitwise Bloom filter. More...
#include <bloom_filter_bitwise.h>
Public Types | |
typedef Core | core_type |
typedef std::function < unsigned(unsigned, unsigned)> | growth_func_type |
Public Member Functions | |
bitwise (core_type &&core, unsigned min_size=128) | |
Create a bitwise Bloom filter. | |
template<typename T > | |
void | add (const T &x) |
Add an item to the set. | |
template<typename T > | |
void | remove (const T &x) |
Remove an item from the set. | |
template<typename T > | |
unsigned | count (const T &x) const |
Get the count of an item. | |
unsigned | levels () const |
void | clear () |
Remove all items from the set. | |
std::string | to_string () const |
Get a string representation of the Bloom filter. | |
Private Types | |
typedef std::vector< core_type > | core_vector |
Private Attributes | |
core_vector | levels_ |
unsigned | min_size_ |
The bitwise Bloom filter.
Definition at line 13 of file bloom_filter_bitwise.h.
bf::bitwise< Core >::bitwise | ( | core_type && | core, |
unsigned | min_size = 128 |
||
) | [inline] |
Create a bitwise Bloom filter.
core | An rvalue reference to the first core. |
min_size | The minimum size of the Bloom filter that represents the most-significant bit. |
Definition at line 26 of file bloom_filter_bitwise.h.
void bf::bitwise< Core >::add | ( | const T & | x | ) | [inline] |
Add an item to the set.
T | The type of the item to insert. |
x | An instance of type T. |
Reimplemented from bf::bloom_filter< bitwise< Core > >.
Definition at line 34 of file bloom_filter_bitwise.h.
unsigned bf::bitwise< Core >::count | ( | const T & | x | ) | const [inline] |
Get the count of an item.
T | The type of the item to query. |
x | An instance of type T. |
Reimplemented from bf::bloom_filter< bitwise< Core > >.
Definition at line 46 of file bloom_filter_bitwise.h.
void bf::bitwise< Core >::remove | ( | const T & | x | ) | [inline] |
Remove an item from the set.
T | The type of the item to delete. |
x | An instance of type T. |
Reimplemented from bf::bloom_filter< bitwise< Core > >.
Definition at line 40 of file bloom_filter_bitwise.h.
std::string bf::bitwise< Core >::to_string | ( | ) | const [inline] |
Get a string representation of the Bloom filter.
Reimplemented from bf::bloom_filter< bitwise< Core > >.
Definition at line 62 of file bloom_filter_bitwise.h.