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

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.

values

Retained sample values; length up to capacity.