libbf  0.1
 All Classes Functions Typedefs Friends Pages
Public Member Functions | Private Member Functions | List of all members
bf::bloom_filter Class Referenceabstract

The abstract Bloom filter interface. More...

#include <bloom_filter.h>

Inheritance diagram for bf::bloom_filter:
Inheritance graph

Public Member Functions

template<typename T >
void add (T const &x)
 Adds an element to the Bloom filter. More...
 
virtual void add (object const &o)=0
 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...
 
virtual size_t lookup (object const &o) const =0
 Retrieves the count of an element. More...
 
virtual void clear ()=0
 Removes all items from the Bloom filter.
 

Private Member Functions

 bloom_filter (bloom_filter const &)=delete
 
bloom_filteroperator= (bloom_filter const &)=delete
 

Detailed Description

The abstract Bloom filter interface.

Definition at line 9 of file bloom_filter.h.

Member Function Documentation

template<typename T >
void bf::bloom_filter::add ( T const &  x)
inline

Adds an element to the Bloom filter.

Template Parameters
TThe type of the element to insert.
Parameters
xAn instance of type T.

Definition at line 22 of file bloom_filter.h.

virtual void bf::bloom_filter::add ( object const &  o)
pure virtual
template<typename T >
size_t bf::bloom_filter::lookup ( T const &  x) const
inline

Retrieves the count of an element.

Template Parameters
TThe type of the element to query.
Parameters
xAn instance of type T.
Returns
A frequency estimate for x.

Definition at line 36 of file bloom_filter.h.

virtual size_t bf::bloom_filter::lookup ( object const &  o) const
pure virtual

Retrieves the count of an element.

Parameters
oA wrapped object.
Returns
A frequency estimate for o.

Implemented in bf::spectral_rm_bloom_filter, bf::basic_bloom_filter, bf::counting_bloom_filter, and bf::bitwise_bloom_filter.


The documentation for this class was generated from the following file: