A lightweight C library for collecting fixed-size samples and computing basic statistics (mean, min, max, variance, and standard deviation) for selected scalar types. The documentation is generated with Doxygen and Sphinx (Breathe).
- minimal dependencies, small API surface
- ring buffer with an indicator of "enough" samples collected
- type-specific functions generated based on configuration
- no floating-point operations for integer types - optimized for embedded CPUs without FPU (e.g., STM32F0, Cortex-M0)
- fixed-point arithmetic for integer types (mean, variance, stdev scaled by 1000)
- native float support for float data types
- exponential smoothing (IIR) filter for cheap running averages (
exponential_smoothing.h) - online (streaming) linear regression with slope, intercept, correlation and uncertainty (
linear_regression.h)