Sample

data class Sample(val value: Double, val delta: Int, var g: Int = 1)

Represents a single sample used in a quantile estimation algorithm.

Each sample stores a numeric value along with metadata used to approximate quantile ranks with bounded error.

Constructors

Link copied to clipboard
constructor(value: Double, delta: Int, g: Int = 1)

Properties

Link copied to clipboard
val delta: Int

The maximum allowable difference between the true rank of this sample and the minimum rank it could occupy. This defines the error bound for quantile approximation.

Link copied to clipboard
var g: Int

The number of observations between this sample and its predecessor. Initially set to 1, but may be increased during compression steps to reduce the number of stored samples.

Link copied to clipboard

The observed value being sampled.

Functions

Link copied to clipboard
open override fun toString(): String