Bloom filters provide a probablistic way to test for membership in a set using a fixed amount of space. This is useful for reducing work when the test definitively rules out the existence of a record.
Bloom filters provide a probablistic way to test for membership in a set using a fixed amount of space. This is useful for reducing work when the test definitively rules out the existence of a record.
(contains? bf x)
True if the filter probably contains the given value.
True if the filter probably contains the given value.
(create expected-size)
(create expected-size error-rate)
Constructs a new bloom filter with the given expected population size and desired error (false positive) rate.
Constructs a new bloom filter with the given expected population size and desired error (false positive) rate.
(filter->form bf)
Build a serializable form for the bloom filter.
Build a serializable form for the bloom filter.
(filter? x)
Predicate which tests whether the value is a BloomFilter.
Predicate which tests whether the value is a BloomFilter.
(form->filter form)
Build a bloom filter from a serialized form.
Build a bloom filter from a serialized form.
(insert bf & xs)
Insert the given elements into a bloom filter. Returns the updated filter.
Insert the given elements into a bloom filter. Returns the updated filter.
(into bf coll)
Insert the collection of elements into a bloom filter. Returns the updated filter.
Insert the collection of elements into a bloom filter. Returns the updated filter.
(merge a b)
Merge the bloom filters together. Only works if bits
and k
match.
Merge the bloom filters together. Only works if `bits` and `k` match.
(mergeable? a b)
Returns true if the two bloom filters can be merged together.
Returns true if the two bloom filters can be merged together.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close