kumulant

HasObservationCount

Result trait for snapshots that know how much evidence they are built from.

Exists so a caller can ask "did this stat see anything?" without knowing which field carries the answer. The count is spelled totalWeights on most results, totalSeen on the sketches and totalWeight on a few others, so before this trait the emptiness check was per-stat knowledge.

The distinction matters because several results report a numerically plausible value on an empty stream. A quantile sketch with no observations reports NaN per quantile precisely so that absence is distinguishable, but a mean reports 0.0, which is not. Gate on isEmpty before trusting any field of a snapshot that might have arrived before the first observation did.

Inheritors

Properties

isEmpty

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

totalWeights

abstract val totalWeights: Double(source)

Cumulative weight of observations folded into this result.