libbf  0.1
 All Classes Functions Typedefs Friends Pages
Public Member Functions | Private Attributes | List of all members
bf::spectral_rm_bloom_filter Class Reference

A spectral Bloom filter with recurring minimum (RM) policy. More...

#include <counting.h>

Inheritance diagram for bf::spectral_rm_bloom_filter:
Inheritance graph

Public Member Functions

 spectral_rm_bloom_filter (hasher h1, size_t cells1, size_t width1, hasher h2, size_t cells2, size_t width2)
 Constructs a spectral RM 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.
 
void remove (object const &o)
 Removes an element. More...
 
- 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 Attributes

counting_bloom_filter first_
 
counting_bloom_filter second_
 

Detailed Description

A spectral Bloom filter with recurring minimum (RM) policy.

Definition at line 105 of file counting.h.

Constructor & Destructor Documentation

bf::spectral_rm_bloom_filter::spectral_rm_bloom_filter ( hasher  h1,
size_t  cells1,
size_t  width1,
hasher  h2,
size_t  cells2,
size_t  width2 
)

Constructs a spectral RM Bloom filter.

Parameters
h1The first hasher.
cells1The number of cells in the first Bloom filter.
width1The number of bits per cell in the first Bloom filter.
h2The second hasher.
cells2The number of cells in the second Bloom filter.
width2The number of bits per cell in the second Bloom filter.

Definition at line 136 of file counting.cc.

Member Function Documentation

void bf::spectral_rm_bloom_filter::add ( object const &  o)
overridevirtual

Adds an element to the Bloom filter.

Parameters
oA wrapped object.

Implements bf::bloom_filter.

Definition at line 149 of file counting.cc.

References bf::counting_bloom_filter::count(), bf::counting_bloom_filter::find_indices(), bf::counting_bloom_filter::find_minima(), bf::counting_bloom_filter::find_minimum(), and bf::counting_bloom_filter::increment().

Here is the call graph for this function:

size_t bf::spectral_rm_bloom_filter::lookup ( object const &  o) const
overridevirtual

Retrieves the count of an element.

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

Implements bf::bloom_filter.

Definition at line 171 of file counting.cc.

References bf::counting_bloom_filter::count(), bf::counting_bloom_filter::find_indices(), bf::counting_bloom_filter::find_minima(), and bf::counting_bloom_filter::find_minimum().

Here is the call graph for this function:

void bf::spectral_rm_bloom_filter::remove ( object const &  o)

Removes an element.

Parameters
oThe object whose cells to decrement by 1.

Definition at line 190 of file counting.cc.

References bf::counting_bloom_filter::decrement(), bf::counting_bloom_filter::find_indices(), bf::counting_bloom_filter::find_minima(), and bf::counting_bloom_filter::find_minimum().

Here is the call graph for this function:


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