Module bloom

Implements Bloom filters Based on: Scalable Bloom Filters by Paulo Sérgio Almeida, Carlos Baquero, Nuno Preguiça, David Hutchison.

Copyright © (C) 2016-2020, Jan Henry Nystrom <JanHenryNystrom@gmail.com> -------------------------------------------------------------------

Authors: Jan Henry Nystrom (JanHenryNystrom@gmail.com).

Description

Implements Bloom filters Based on: Scalable Bloom Filters by Paulo Sérgio Almeida, Carlos Baquero, Nuno Preguiça, David Hutchison

Data Types

filter()

abstract datatype: filter()

opt()

opt() = fixed | scalable | {size, integer()} | {error_prob, float()} | {error_ratio, float()} | {growth_ratio, integer()}

Function Index

add/2 Adds a term to the Bloom filter.
capacity/1 Returns the capacity of the Bloom filter.
filter/0 Returns a bloom filter.
filter/1 Returns a bloom filter Options are: fixed -> standard partitioned bloom filter, default type scalable -> scalable bloom filter size -> the maximum size for fixed and initial size for scalable filter the defaults are 4000 and 32000 respectively error_prob -> error probability, default 0.001 Options relevant to scalable filters only growth_ratio -> log 2 of growth ratio, one of 1, 2, 3 default 1 error_ratio -> error probability ratio, default 0.85.
is_filter/1 Returns true if the argument is a Bloom filter.
member/2 Returns if the term is a member of the Bloom filter.
type/1 Returns the type of Bloom filter.

Function Details

add/2

add(Term::term(), F::filter()) -> filter()

Adds a term to the Bloom filter

capacity/1

capacity(Filter::filter()) -> integer()

Returns the capacity of the Bloom filter

filter/0

filter() -> filter()

Returns a bloom filter

filter/1

filter(Opts::[opt()]) -> filter()

Returns a bloom filter Options are: fixed -> standard partitioned bloom filter, default type scalable -> scalable bloom filter size -> the maximum size for fixed and initial size for scalable filter the defaults are 4000 and 32000 respectively error_prob -> error probability, default 0.001 Options relevant to scalable filters only growth_ratio -> log 2 of growth ratio, one of 1, 2, 3 default 1 error_ratio -> error probability ratio, default 0.85

is_filter/1

is_filter(Filter::term()) -> boolean()

Returns true if the argument is a Bloom filter

member/2

member(Term::term(), Filter::filter()) -> boolean()

Returns if the term is a member of the Bloom filter

type/1

type(Filter::term()) -> fixed | scalable

Returns the type of Bloom filter


Generated by EDoc