diff options
Diffstat (limited to 'api/variance.hpp')
-rw-r--r-- | api/variance.hpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/api/variance.hpp b/api/variance.hpp index 55060b02..7a83154c 100644 --- a/api/variance.hpp +++ b/api/variance.hpp @@ -1,6 +1,7 @@ #pragma once #include <cmath> +#include <cinttypes> // no copyright information other than the attribution below. @@ -20,13 +21,17 @@ class variance { double m_old, m_new, s_old, s_new; - unsigned long cnt; + std::uintptr_t cnt; public: + using size_type = std::uintptr_t; + variance() : cnt(0) {} void clear() { *this = variance(); } + size_type count() { return cnt; } + void input(double x) { cnt++; |