Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EstimateParameters ¶
EstimateParameters estimates requirements for m and k.
Based on: https://en.wikipedia.org/wiki/Bloom_filter#Optimal_number_of_hash_functions
Types ¶
type DIBF ¶
type DIBF struct {
// contains filtered or unexported fields
}
DIBF represents a Deletable Bloom filter.
Based on: https://arxiv.org/pdf/1005.0352.pdf
func New ¶
New returns a new pointer to a Deletable Bloom filter.
m - the total number of bits in the Bloom filter. k - the number of hash functions used. r - the size of the bitset used to store the collsions (r <= m).
func NewWithEstimates ¶
NewWithEstimates returns a pointer to a standard Bloom filter with the given number of items and false positive rate.
func (*DIBF) ApproximateCount ¶
ApproximateCount returns the approximate number of items in the Bloom filter.
Based on: https://en.wikipedia.org/wiki/Bloom_filter#Approximating_the_number_of_items_in_a_Bloom_filter
func (*DIBF) CurrentFalsePositiveRate ¶
CurrentFalsePositiveRate returns the current false positive rate of the Bloom filter.
Based on: https://en.wikipedia.org/wiki/Bloom_filter#Probability_of_false_positives