bloom_filter v1.0.1 BloomFilter
Bloom Filter implementation in Elixir. Bloom filters are probabilistic data structures designed to efficiently tell you whether an element is present in a set.
## Usage Example
iex> f = BloomFilter.new 100, 0.001
iex> f = BloomFilter.add(f, 42)
iex> BloomFilter.has?(f, 42)
true
Summary
Functions
Adds a given item to the set
Approximates the number of items in the filter
Checks whether a given item is likely to exist in the set
Creates a new bloom filter, given an estimated number of elements and a desired error rate (0.0..1)
Types
Functions
Specs
has?(t, any) :: boolean
Checks whether a given item is likely to exist in the set.
Specs
new(pos_integer, float) :: t
Creates a new bloom filter, given an estimated number of elements and a desired error rate (0.0..1).