num::streaming_accumulator¶
Defined in header <stats/concepts.hpp>
template <class A, class T = real>
concept streaming_accumulator = field<T> && requires(A acc, T x) {
acc.update(x);
{ acc.count } -> std::convertible_to<idx>;
};
Accumulator absorbing samples one at a time and reporting a summary.
The defining property is that cost per sample and storage are both constant. Welford's recurrence and a fixed-bin histogram qualify, while anything that retains the samples in order to summarize them does not.