Discover Packages
github.com/apmckinlay/gsuneido
util
kll
package
Version:
v0.0.0-...-df9bf87
Opens a new window with list of versions in this module.
Published: Jul 28, 2026
License: MIT
Opens a new window with license information.
Imports: 4
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
Package kll implements a KLL-style sketch.
It give approximate quantile estimates from a stream of values.
See: Optimal Quantile Approximation in Streams
https://arxiv.org/pdf/1603.05346
Sketch accumulates a stream of values
New creates a new Sketch with the default k value.
Count returns the number of values inserted into the sketch.
func (sk *Sketch [T]) Insert(value T)
Insert adds a new value to the sketch, compacting levels as necessary.
Query returns the approximate value at the given quantile (0.0 <= q <= 1.0).
For example, Query(0.5) returns the approximate median.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.