Return the current load of this filter, iterate on all buckets
An integer between 0 and 1, where 0 = filter empty and 1 = filter full
Add an element to the filter
The element to add
Return a PartitionedBloomFilter for a given number of elements and under a given error rate
The max allowable number of items to insert
The desired error rate
A new PartitionedBloomFilter optimal for the given parameters
Check if another Partitioned Bloom Filter is equal to this one
True if they are equal, false otherwise
Build a new Partitioned Bloom Filter from an existing iterable with a fixed error rate
The iterable used to populate the filter
The error rate, i.e. 'false positive' rate, targetted by the filter
The filter's load factor
A new Bloom Filter filled with the iterable's elements
Load an Object from a provided JSON object
the JSON object to load
Return the Object loaded from the provided JSON object
Test an element for membership
The element to look for in the filter
False if the element is definitively not in the filter, True is the element might be in the filter
Return a next random seeded int32 integer
Compute the current false positive rate (or error rate) of the filter
The current false positive rate of the filter
Save the current structure as a JSON
Get the filter capacity, i.e. the maximum number of elements it will contains
Get the filter's load factor
Get a function used to draw random number
A factory function used to draw random integer
Get the seed used in this structure
Set the seed for this structure
the new seed that will be used in this structure
Get the size of the filter
Constructor
The total number of cells
The number of hash functions
The load factor
The filter capacity
Generated using TypeDoc
A Partitioned Bloom Filter is a variation of a classic Bloom filter.
This filter works by partitioning the M-sized bit array into k slices of size m = M/k bits, k = nb of hash functions in the filter. Each hash function produces an index over m for its respective slice. Thus, each element is described by exactly k bits, meaning the distribution of false positives is uniform across all elements.
Be careful, as a Partitioned Bloom Filter have much higher collison risks that a classic Bloom Filter on small sets of data.
Reference: Chang, F., Feng, W. C., & Li, K. (2004, March). Approximate caches for packet classification. In INFOCOM 2004. Twenty-third AnnualJoint Conference of the IEEE Computer and Communications Societies (Vol. 4, pp. 2196-2207). IEEE.
https://pdfs.semanticscholar.org/0e18/e24b37a1f4196fddf8c9ff8e4368b74cfd88.pdf for more details about Partitioned Bloom Filters
Thomas Minier & Arnaud Grall