Crate sketchy [−] [src]

Sketchy is a Rust library of probabilistic data structures, useful for measuring large or unbounded streams of data by trading some accuracy for a whole lot of efficiency.

Structs

BloomFilter

A Bloom filter is a space-efficient probabilistic data structure that is used to test whether an element is a member of a set. False positive matches are possible, but false negatives are not.

CountMinSketch

A Count-Min Sketch is a probabilistic data structure which provides estimates of the frequency of elements in a data stream. It is parameterized with the type of elements.

HyperLogLog

A HyperLogLog allows for space-efficient estimates of the cardinality of large multisets.

ReservoirSample

A reservoir sample maintains a sample of K elements, selected uniformly and at random from a stream. This implementation uses Vitter's Algorithm R with thread-local PRNGs.

TopK

A Top-K heap is a probabilistic data structure which uses a Count-Min Sketch to calculate the top K elements in a data stream with the highest frequency.