libBf 0.1
Public Types | Public Member Functions | Private Types | Private Attributes

bf::spectral_rm< Core1, Core2 > Class Template Reference

The spectral Bloom filter with recurring minimum optimization. More...

#include <bloom_filter_spectral.h>

Inheritance diagram for bf::spectral_rm< Core1, Core2 >:
Inheritance graph
[legend]

List of all members.

Public Types

typedef Core1 core1_type
typedef Core2 core2_type

Public Member Functions

 spectral_rm (core1_type &&core1, core2_type &&core2)
 Create a spectral Bloom filter (RM).
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.
const core1_type & core1 () const
 Get the first core.
const core2_type & core2 () const
 Get the second core.
std::string to_string () const
 Get a string representation of the Bloom filter.

Private Types

typedef bloom_filter
< spectral_rm< Core1, Core2 > > 
base

Private Attributes

core1_type core1_
core2_type core2_

Detailed Description

template<typename Core1 = core<>, typename Core2 = Core1>
class bf::spectral_rm< Core1, Core2 >

The spectral Bloom filter with recurring minimum optimization.

Definition at line 38 of file bloom_filter_spectral.h.


Constructor & Destructor Documentation

template<typename Core1 = core<>, typename Core2 = Core1>
bf::spectral_rm< Core1, Core2 >::spectral_rm ( core1_type &&  core1,
core2_type &&  core2 
) [inline]

Create a spectral Bloom filter (RM).

Parameters:
core1An rvalue reference to the first core.
core2An rvalue reference to the second core.

Definition at line 48 of file bloom_filter_spectral.h.


Member Function Documentation

template<typename Core1 = core<>, typename Core2 = Core1>
template<typename T >
void bf::spectral_rm< Core1, Core2 >::add ( const T &  x) [inline]

Add an item to the set.

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

Reimplemented from bf::bloom_filter< spectral_rm< Core1, Core2 > >.

Definition at line 55 of file bloom_filter_spectral.h.

template<typename Core1 = core<>, typename Core2 = Core1>
const core1_type& bf::spectral_rm< Core1, Core2 >::core1 ( ) const [inline]

Get the first core.

Returns:
A reference to the first core.

Definition at line 80 of file bloom_filter_spectral.h.

template<typename Core1 = core<>, typename Core2 = Core1>
const core2_type& bf::spectral_rm< Core1, Core2 >::core2 ( ) const [inline]

Get the second core.

Returns:
A reference to the second core.

Definition at line 87 of file bloom_filter_spectral.h.

template<typename Core1 = core<>, typename Core2 = Core1>
template<typename T >
unsigned bf::spectral_rm< Core1, Core2 >::count ( const T &  x) const [inline]

Get the count of an item.

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

Reimplemented from bf::bloom_filter< spectral_rm< Core1, Core2 > >.

Definition at line 67 of file bloom_filter_spectral.h.

template<typename Core1 = core<>, typename Core2 = Core1>
template<typename T >
void bf::spectral_rm< Core1, Core2 >::remove ( const T &  x) [inline]

Remove an item from the set.

Template Parameters:
TThe type of the item to delete.
Parameters:
xAn instance of type T.

Reimplemented from bf::bloom_filter< spectral_rm< Core1, Core2 > >.

Definition at line 61 of file bloom_filter_spectral.h.

template<typename Core1 = core<>, typename Core2 = Core1>
std::string bf::spectral_rm< Core1, Core2 >::to_string ( ) const [inline]

Get a string representation of the Bloom filter.

Returns:
A string representing of the Bloom filter.

Reimplemented from bf::bloom_filter< spectral_rm< Core1, Core2 > >.

Definition at line 92 of file bloom_filter_spectral.h.


The documentation for this class was generated from the following file:
 All Classes Functions Variables