add

fun add(x: Double)(source)

Adds a single observation to the accumulator.

Updates all internal moments using the Terriberry (2008) single-pass algorithm. The update order is critical: M4 → M3 → M2 → mean, as each formula uses the previous values of the lower moments.

Parameters

x

the value to add.