]> AND Private Git Repository - loba.git/blob - statistics.h
Logo AND Algorithmique Numérique Distribuée

Private GIT Repository
Rename process::send() -> process::send_all().
[loba.git] / statistics.h
1 #ifndef STATISTICS_H
2 #define STATISTICS_H
3
4 #include <vector>
5
6 class statistics {
7 public:
8     statistics();
9
10     void reset();
11     void push(double value);
12
13     size_t get_count();
14     double get_sum();
15     double get_avg();
16     double get_stddev();
17
18 private:
19     bool up2date;
20
21     std::vector<double> values;
22     double sum;
23     double avg;
24     double stddev;
25
26     void update();
27 };
28
29 #endif // !STATISTICS_H
30
31 // Local variables:
32 // mode: c++
33 // End: