Skip to content

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 that uses constant time and storage per sample.