libBf 0.1
Public Types | Public Member Functions | Public Attributes

bf::core< Store, Hash, Partition > Struct Template Reference

The Bloom filter core class. More...

#include <core.h>

List of all members.

Public Types

typedef Store store_type
typedef Hash hash_type
typedef Partition part_type
typedef core< store_type,
hash_type, part_type > 
core_type

Public Member Functions

 core (typename Store::size_type cells, unsigned k, unsigned width=1, unsigned parts=1, typename std::enable_if< std::is_same< store_type, fixed_width< typename store_type::block_type, typename store_type::allocator_type > >::value > *dummy=0)
 Create a core object for fixed-width storage.
void swap (core_type &c)
template<typename T >
std::vector< typename
store_type::size_type > 
positions (const T &x) const
 For a given item \(x\), compute the (at most) \(k\) corresponding cell indices in the store.

Public Attributes

store_type store
hash_type hash
part_type part

Detailed Description

template<typename Store = fixed_width<unsigned char, std::allocator<unsigned char>>, typename Hash = default_hashing<>, typename Partition = no_partitioning>
struct bf::core< Store, Hash, Partition >

The Bloom filter core class.

It can be customized with a different store, hash, and partition policy. The store policy determines the underlying storage layout, the hash policy codifies the hash algorithm and scheme, and the partition policy indicates how to split up the underlying storage cells.

Definition at line 21 of file core.h.


Constructor & Destructor Documentation

template<typename Store = fixed_width<unsigned char, std::allocator<unsigned char>>, typename Hash = default_hashing<>, typename Partition = no_partitioning>
bf::core< Store, Hash, Partition >::core ( typename Store::size_type  cells,
unsigned  k,
unsigned  width = 1,
unsigned  parts = 1,
typename std::enable_if< std::is_same< store_type, fixed_width< typename store_type::block_type, typename store_type::allocator_type > >::value > *  dummy = 0 
) [inline]

Create a core object for fixed-width storage.

Parameters:
cellsThe number of bits of the underlying bit vector.
kThe number of hash functions.
widthThe number of bits per cell.
partsThe number of parts used in the partition policy.

Definition at line 33 of file core.h.


Member Function Documentation

template<typename Store = fixed_width<unsigned char, std::allocator<unsigned char>>, typename Hash = default_hashing<>, typename Partition = no_partitioning>
template<typename T >
std::vector<typename store_type::size_type> bf::core< Store, Hash, Partition >::positions ( const T &  x) const [inline]

For a given item \(x\), compute the (at most) \(k\) corresponding cell indices in the store.

Template Parameters:
Tthe type of the item.
xThe item to compute the positions for.
Returns:
A vector with positions in the store.

Definition at line 69 of file core.h.


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