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

A spectral Bloom filter with minimum increase (MI) policy. More...

#include <counting.h>

Inheritance diagram for bf::spectral_mi_bloom_filter:
Inheritance graph

Public Member Functions

 spectral_mi_bloom_filter (hasher h, size_t cells, size_t width)
 Constructs a spectral MI Bloom filter. More...
 
virtual void add (object const &o) override
 Adds an element to the Bloom filter. More...
 
- Public Member Functions inherited from bf::counting_bloom_filter
 counting_bloom_filter (hasher h, size_t cells, size_t width)
 Constructs a counting Bloom filter. More...
 
 counting_bloom_filter (counting_bloom_filter &&)=default
 Move-constructs a counting Bloom filter.
 
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...
 
template<typename T >
void remove (T const &x)
 
- 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...
 

Additional Inherited Members

- Protected Member Functions inherited from bf::counting_bloom_filter
std::vector< size_t > find_indices (object const &o, bool part=false) const
 Maps an object to the indices in the underlying counter vector. More...
 
size_t find_minimum (std::vector< size_t > const &indices) const
 Finds the minimum value in a list of arbitrary indices. More...
 
std::vector< size_t > find_minima (std::vector< size_t > const &indices) const
 Finds one or more minimum indices for a list of arbitrary indices. More...
 
bool increment (std::vector< size_t > const &indices, size_t value=1)
 Increments a given set of indices in the underlying counter vector. More...
 
bool decrement (std::vector< size_t > const &indices, size_t value=1)
 Decrements a given set of indices in the underlying counter vector. More...
 
size_t count (size_t index) const
 Retrieves the counter for given cell index. More...
 
- Protected Attributes inherited from bf::counting_bloom_filter
hasher hasher_
 
counter_vector cells_
 

Detailed Description

A spectral Bloom filter with minimum increase (MI) policy.

Definition at line 89 of file counting.h.

Constructor & Destructor Documentation

bf::spectral_mi_bloom_filter::spectral_mi_bloom_filter ( hasher  h,
size_t  cells,
size_t  width 
)

Constructs a spectral MI Bloom filter.

Parameters
hThe hasher.
cellsThe number of cells.
widthThe number of bits per cell.

Definition at line 124 of file counting.cc.

Member Function Documentation

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

Adds an element to the Bloom filter.

Parameters
oA wrapped object.

Reimplemented from bf::counting_bloom_filter.

Definition at line 130 of file counting.cc.

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

Here is the call graph for this function:


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