TDigest class

Lightweight t-digest implementation for streaming quantile estimation.

Keeps sorted centroids and greedily compresses using a size bound based on cumulative quantile position. Quantiles are estimated via boundary interpolation between adjacent centroids.

Constructors

TDigest({int compression = 200})
Creates a t-digest with a target compression (cluster upper bound). Higher values use more memory and provide more accurate tails.

Properties

compression → int
Target compression parameter controlling cluster sizes.
final
count → double
Total weight of all samples added.
no setter
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

add(double x, [double w = 1]) → void
Adds a single sample x with optional weight w (default 1).
addAll(Iterable<double> values) → void
Adds all values from values with unit weight.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
quantile(double q) → double
Estimates the value at quantile q where q is in 0,1.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited