#pragma once

#include <ostream>

class LiveAgg {
   public:
    LiveAgg();
    [[nodiscard]] double getSD() const noexcept;
    [[nodiscard]] double getSEM() const noexcept;
    [[nodiscard]] double getMean() const noexcept;
    [[nodiscard]] int getNumPoints() const noexcept;
    void feed(double value) noexcept;

    friend std::ostream &operator<<(std::ostream &os, const LiveAgg &agg);

private:
    int num_of_data;
    double mean;
    double S;
};
