Simple implementation of basic Bloom filter.
First you should creat a bloom object. For example create an object with max 1024 of bits.
Bloom = bloom_filter:new(1024).
Bloom1 = bloom_filter:add("test", Bloom).
maybe = bloom_filter:is_member("test", Bloom1),
false = bloom_filter:is_member("test2", Bloom1).
0 = bloom_filter:probability(Bloom1),
Bloom2 = lists:foldl(fun(I, BloomAcc) ->
bloom_filter:add(I, BloomAcc)
end,
Bloom,
lists:seq(1, 64)),
12 = bloom_filter:probability(Bloom1).