kumulant

ReservoirResult

@Serializable
@SerialName(value = "ReservoirResult")
data class ReservoirResult(val values: DoubleArray, val keys: DoubleArray, val capacity: Int, val totalSeen: Long, val totalWeight: Double) : HasObservationCount(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

ReservoirResult

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

Properties

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.

totalWeights

open override val totalWeights: Double(source)

Cumulative weight of observations folded into this result.

values

Retained sample values; length up to capacity.

Link copied to clipboard
open val isEmpty: Boolean

True when no observation has been folded in, so every other field is a placeholder.

Functions

equals

open operator override fun equals(other: Any?): Boolean(source)

hashCode

open override fun hashCode(): Int(source)

toString

open override fun toString(): String(source)
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.