libbf
0.1
Main Page
Classes
All
Classes
Functions
Typedefs
Friends
Pages
src
bf
bloom_filter.h
1
#ifndef BF_BLOOM_FILTER_H
2
#define BF_BLOOM_FILTER_H
3
4
#include <bf/wrap.h>
5
6
namespace
bf {
7
9
class
bloom_filter
10
{
11
bloom_filter
(
bloom_filter
const
&) =
delete
;
12
bloom_filter
& operator=(
bloom_filter
const
&) =
delete
;
13
14
public
:
15
bloom_filter
() =
default
;
16
virtual
~
bloom_filter
() =
default
;
17
21
template
<
typename
T>
22
void
add
(T
const
& x)
23
{
24
add
(wrap(x));
25
}
26
29
virtual
void
add
(
object
const
& o) = 0;
30
35
template
<
typename
T>
36
size_t
lookup
(T
const
& x)
const
37
{
38
return
lookup
(wrap(x));
39
}
40
44
virtual
size_t
lookup
(
object
const
& o)
const
= 0;
45
47
virtual
void
clear
() = 0;
48
};
49
50
}
// namespace bf
51
52
#endif
Generated by
1.8.3.1