|
libBf 0.1
|
The Bloom filter interface. More...
#include <bloom_filter.h>

Public Member Functions | |
| 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. | |
| void | clear () |
| Remove all items from the set. | |
| unsigned long | n () const |
| Get the number of items in the set, counted via add and remove. | |
| std::string | to_string () const |
| Get a string representation of the Bloom filter. | |
Protected Attributes | |
| unsigned long | n_ |
| The (multi)set cardinality. | |
Private Member Functions | |
| template<typename D > | |
| D & | derived () const |
| template<typename D > | |
| const D & | derived () const |
The Bloom filter interface.
| Derived | The type of the child class that implements a Bloom filter. |
Definition at line 11 of file bloom_filter.h.
| void bf::bloom_filter< Derived >::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 in bf::a2< Core >, bf::basic< Core >, bf::bitwise< Core >, bf::spectral_mi< Core >, bf::spectral_rm< Core1, Core2 >, and bf::stable< Core, Generator >.
Definition at line 18 of file bloom_filter.h.
| unsigned bf::bloom_filter< Derived >::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 in bf::a2< Core >, bf::basic< Core >, bf::bitwise< Core >, and bf::spectral_rm< Core1, Core2 >.
Definition at line 39 of file bloom_filter.h.
| unsigned long bf::bloom_filter< Derived >::n | ( | ) | const [inline] |
Get the number of items in the set, counted via add and remove.
Definition at line 53 of file bloom_filter.h.
| void bf::bloom_filter< Derived >::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 in bf::a2< Core >, bf::basic< Core >, bf::bitwise< Core >, bf::spectral_mi< Core >, bf::spectral_rm< Core1, Core2 >, and bf::stable< Core, Generator >.
Definition at line 28 of file bloom_filter.h.
| std::string bf::bloom_filter< Derived >::to_string | ( | ) | const [inline] |
Get a string representation of the Bloom filter.
Reimplemented in bf::a2< Core >, bf::basic< Core >, bf::bitwise< Core >, and bf::spectral_rm< Core1, Core2 >.
Definition at line 60 of file bloom_filter.h.
1.7.3