Packages

package sketch

Type Members

  1. abstract class BloomFilter extends AnyRef

    A Bloom filter is a space-efficient probabilistic data structure that offers an approximate containment test with one-sided error: if it claims that an item is contained in it, this might be in error, but if it claims that an item is not contained in it, then this is definitely true.

    A Bloom filter is a space-efficient probabilistic data structure that offers an approximate containment test with one-sided error: if it claims that an item is contained in it, this might be in error, but if it claims that an item is not contained in it, then this is definitely true. Currently supported data types include:

    • Byte
    • Short
    • Integer
    • Long
    • String

    The false positive probability (FPP) of a Bloom filter is defined as the probability that #mightContain(Object) will erroneously return true for an object that has not actually been put in the BloomFilter.

    The implementation is largely based on the BloomFilter class from Guava.

  2. abstract class CountMinSketch extends AnyRef

    A Count-min sketch is a probabilistic data structure used for cardinality estimation using sub-linear space.

    A Count-min sketch is a probabilistic data structure used for cardinality estimation using sub-linear space. Currently, supported data types include:

    • Byte
    • Short
    • Integer
    • Long
    • String

    A CountMinSketch is initialized with a random seed, and a pair of parameters:

    • relative error (or eps), and
    • confidence (or delta)

    Suppose you want to estimate the number of times an element x has appeared in a data stream so far. With probability delta, the estimate of this frequency is within the range true frequency <= estimate <= true frequency + eps * N, where N is the total count of items have appeared the data stream so far.

    Under the cover, a CountMinSketch is essentially a two-dimensional long array with depth d and width w, where

    • d = ceil(2 / eps)
    • w = ceil(-log(1 - confidence) / log(2))

    This implementation is largely based on the CountMinSketch class from stream-lib.

  3. class IncompatibleMergeException extends Exception

Ungrouped