module CCBloom:sig
..end
status: experimental
Since 0.13
type'a
sequence =('a -> unit) -> unit
type'a
gen =unit -> 'a option
type'a
hash_funs =('a -> int) array
k
hash functions on values of type 'a
.
Never ever modify such an array after use!val default_hash_funs : int -> 'a hash_funs
Hashtbl.seeded_hash
on k
seedstype 'a
t
'a
val create : ?hash:'a hash_funs -> int -> 'a t
create ?hash size
creates a filter with given size, and functions.
By default it uses CCBloom.default_hash_funs
val create_default : ?hash_len:int -> int -> 'a t
create_default ?hash_len size
is the same as
create ~hash:(default_hash_funs hash_len) size
.
It uses the given number of default hash functions.val copy : 'a t -> 'a t
val size : 'a t -> int
val load : 'a t -> float
val mem : 'a t -> 'a -> bool
mem f x
tests whether x
(probably) belongs to f
val add : 'a t -> 'a -> unit
add f x
adds x
into f
val union_mut : into:'a t -> 'a t -> unit
union_mut ~into f
changes into
into the union of into
and f
.
into
and f
MUST have the same set of hash functionsInvalid_argument
if the two sets do not have the same sizeval union : 'a t -> 'a t -> 'a t
Invalid_argument
if the two sets do not have the same sizeval inter_mut : into:'a t -> 'a t -> unit
inter_mut ~into f
changes into
into the intersection of into
and f
into
and f
MUST have the same set of hash functionsInvalid_argument
if the two sets do not have the same sizeval inter : 'a t -> 'a t -> 'a t
Invalid_argument
if the two sets do not have the same sizeval add_list : 'a t -> 'a list -> unit
val add_seq : 'a t -> 'a sequence -> unit
val add_gen : 'a t -> 'a gen -> unit