#ifndef BLOOMFILTER_H
#define BLOOMFILTER_H
#include "buffer.h"
/* Short explanation of bloom filter:
Bloom filter is a space-efficient probabilistic filter. The idea is
that each element that gets added, is hashed thru one or more hashing
functions and the resulting hash modulo table size bit is set.
When seeing if there is an element set, it will check that each
hashing function result modulo table size bit is set. If any of them
is not set, the element is missing. If all of them are set, the
element is probably present.
A bloom filter will never report a false negative, but it might
report a false positive value.
Elements cannot be removed from this bloom filter.
*/
struct bloomfilter;
/* create bloomfilter of size with hash functions */
struct bloomfilter *
/* Some helpers */
/* Reference counting */
/* Returns estimated number of items in this filter */
/* Returns TRUE if the element is probably in the filter */
/* Inserts element into filter */
static inline bool
{
}
static inline void
{
}
static inline void
{
datum++;
}
}
static inline bool
{
}
static inline void
{
}
static inline bool
{
}
static inline void
{
}
static inline bool
{
}
static inline void
{
}
/* By default, only murmur3 is used. */
extern bloomfilter_hash_func_t *const bloomfilter_default_functions[];
#endif