ReservoirResult
Reservoir sampling snapshot.
values holds the retained sample (size up to capacity); keys holds the parallel A-Res priority keys used to drive merging. totalSeen and totalWeight count every observed update, not just retained ones.
Constructors
ReservoirResult
Properties
capacity
keys
Parallel A-Res priority keys used to drive merging.
totalSeen
totalWeight
Cumulative observation weight folded in.
totalWeights
Cumulative weight of observations folded into this result.
values
Retained sample values; length up to capacity.
True when totalWeights is not positive, including zero, negative values, and NaN.
Functions
equals
hashCode
toString
Linear-interpolated quantile at probability from the reservoir sample. Each retained value counts once: A-Res admission already favours heavier observations, so the sample stands for the weighted stream and reweighting it would count the weights twice.
Bucket the retained sample into binCount equal-width bins between min and max.