Module Owl_heavyhitters_sketch.Make



Type definition
type 'a t

The type of heavy-hitters sketches

Core functions
val init : k:float -> epsilon:float -> delta:float -> 'a t

`init k epsilon delta` initializes a sketch with threshold k, approximation factor epsilon, and failure probability delta.

val add : 'a t -> 'a -> unit

`add h x` adds value `x` to sketch `h` in-place.

val get : 'a t -> ('a * int) list

`get h` returns a list of all heavy-hitters in sketch `h`, as a (value, frequency) pair, sorted in decreasing order of frequency.