class xf::database::gqe::BloomFilter

#include "gqe_bloomfilter.hpp"

Overview


Methods

BloomFilter

BloomFilter (
    uint64_t num_keys,
    float fpp = 0.05f
    )

constructor of BloomFilter

Calculates the size of the bloom-filter based on the number of unique keys and the equation provided in: https://en.wikipedia.org/wiki/Bloom_filter, as well as allocates buffer for the internal hash-table

Parameters:

num_keys number of unique keys to be built into the hash-table of the bloom-filter
fpp false positive probability (5% by default)

build

void build (
    Table tab_in,
    std::string col_names
    )

build the hash-table with the given key column from input table,

key_names_str should be comma separated, e.g. “key0, key1”

Parameters:

tab_in input table
key_names_str key column names (comma separated) of the input table to be built into hash-table

merge

void merge (BloomFilter& bf_in)

merge the input bloom-filter into the current one

Parameters:

bf_in input bloom-filter

getHashTable

ap_uint <256>** getHashTable () const

get the bloom-filter hash-table

Returns:

hash-table of the bloom-filter

getBloomFilterSize

uint64_t getBloomFilterSize () const

get the bloom-filter size

Returns:

size of the bloom-filter