HashFunctors< Item > Class Template Reference

Define a set of hash functions. More...

#include <Bloom.hpp>

Public Member Functions

 HashFunctors (size_t nbFct, u_int64_t seed=0)
u_int64_t operator() (const Item &key, size_t idx)

Detailed Description

template<typename Item>
class gatb::core::tools::collections::impl::HashFunctors< Item >

Define a set of hash functions.

This class defines a set of hash functions for a given (template) type.

One can get a hash code for a given [function,item] through the operator()

Note: this class is mainly used by Bloom filters implementations. It is not primarly targeted for end users but they could nevertheless use it.

Constructor & Destructor Documentation

HashFunctors ( size_t  nbFct,
u_int64_t  seed = 0 


[in]nbFct: number of hash functions to be used
[in]seed: some initialization code for defining the hash functions.

Member Function Documentation

u_int64_t operator() ( const Item &  key,
size_t  idx 

Get a hash code for a hash function and a given item.

[in]key: item for which we want a hash code
[in]idx: index of the hash function to be used
the hash code for the item.

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