gloomex v0.2.0 Gloomex
A fast and concurrent bloom filter.
It's goal is to emulate Guava bloom filter, mantaining the same behavior regarding false positives.
Link to this section Summary
Functions
Check if the element is in the bloom filter. Beware that this may be a false positive. There's no false negatives, i.e. if the result is false the element is not present.
Returns a plain Bloom filter based on the provided arguments
Returns a plain Bloom filter filled from each line in the file
See &plain/3
for the options
Puts a new element in the bloom filter
Link to this section Types
Specs
t() :: Gloomex.Bloom.t()
Link to this section Functions
might_contain?(bloom, e)
Specs
Check if the element is in the bloom filter. Beware that this may be a false positive. There's no false negatives, i.e. if the result is false the element is not present.
plain(expected_insertions, fpp, strategy \\ Gloomex.BloomFilterStrategy.Murmur128MITZ64)
Specs
plain(pos_integer(), float(), Gloomex.BloomFilterStrategy.t()) :: t()
Returns a plain Bloom filter based on the provided arguments:
expected_insertions
, used to calculate the size of the bit arrayfpp
, the false positive probabilitystrategy
, strategy implementing hash function
If a hash function is not provided then Murmur3_x64_128 will be used.
plain_from_file(file, fpp, strategy \\ Gloomex.BloomFilterStrategy.Murmur128MITZ64)
Specs
plain_from_file(String.t(), float(), Gloomex.BloomFilterStrategy.t()) :: t()
Returns a plain Bloom filter filled from each line in the file
See &plain/3
for the options
put(bloom, e)
Specs
Puts a new element in the bloom filter