kumulant

ReservoirResult

@Serializable
@SerialName(value = "ReservoirResult")
data class ReservoirResult(val values: DoubleArray, val keys: DoubleArray, val capacity: Int, val totalSeen: Long, val totalWeight: Double) : Result(source)

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

Link copied to clipboard
constructor(values: DoubleArray, keys: DoubleArray, capacity: Int, totalSeen: Long, totalWeight: Double)

Properties

Link copied to clipboard

Reservoir size.

Link copied to clipboard

Parallel A-Res priority keys used to drive merging.

Link copied to clipboard

Total observations the sketch has absorbed (not just retained).

Link copied to clipboard

Cumulative observation weight folded in.

Link copied to clipboard

Retained sample values; length up to capacity.

Functions

Link copied to clipboard

Linear-interpolated quantile at probability from a reservoir sample (treats sample as unweighted).

Link copied to clipboard

Bucket the retained sample into binCount equal-width bins between min and max.

ReservoirResult

constructor(values: DoubleArray, keys: DoubleArray, capacity: Int, totalSeen: Long, totalWeight: Double)(source)

capacity

Reservoir size.

keys

Parallel A-Res priority keys used to drive merging.

totalSeen

Total observations the sketch has absorbed (not just retained).

totalWeight

Cumulative observation weight folded in.

values

Retained sample values; length up to capacity.