SummaryStat
Comprehensive summary stat; Welford mean/variance plus monotonic min/max in one accumulator. The result implements both HasCenterScale (center=mean, scale=stdDev) and HasMinMax (min, max), so feedback projections can address Center/Scale and Low/High on the same primary. Use it when a per-coordinate primary fan-out needs to support both standardisation and min-max scaling.
Use cases: mixed feature scaling in one feedback pipeline; any consumer that wants both moment-based and extremum-based statistics in a single read.
Memory: O(1); five doubles plus a lock.
Update: O(1) per observation.
Concurrency: Composes a VarianceStat and a RangeStat. Under Concurrency.Strict and Concurrency.HighWrite one lock covers both, so each update is atomic and a read is coherent; under Concurrency.Relaxed the lock drops, the variance cells drift as in VarianceStat and the extrema stay exact; never throws.
Constructors
SummaryStat
Properties
concurrency
Thread-safety mode fixed at construction. See Concurrency for the shared contract and the implementation's KDoc for its cell and lock strategy.
Functions
create
Create an independent accumulator at the configured baseline. A null concurrency preserves this accumulator's mode; a non-null value overrides it. Modality subtypes narrow the return type to preserve the input shape.
merge
Fold a compatible snapshot values into this accumulator at timestampNanos. Implementations document whether the combine is exact or approximate and which state the snapshot omits. The source accumulator is unaffected.
Time-dependent statistics, such as windows, place the snapshot at timestampNanos, which must share the clock the caller uses for updates and reads. Time-independent statistics ignore it.
read
Return the current result evaluated at timestampNanos. Time-independent statistics ignore the timestamp. Reading does not add an observation.
Snapshot consistency depends on the implementation's synchronisation. Locks protect coupled state under Concurrency.Strict and Concurrency.HighWrite; independently updated cells and JVM striped adders can still yield a best-effort snapshot. Concurrency.Relaxed permits drift across coupled cells.
reset
Restore the configured baseline, including any prior seed. Preserves the configuration and concurrency.