worked on wifi-scanner for linux

new time-grouping for vap grouper
adjusted test-cases
minor changes/fixes/improvements
This commit is contained in:
2017-10-11 14:00:24 +02:00
parent 628be72e1f
commit da477866c1
13 changed files with 649 additions and 223 deletions

View File

@@ -15,7 +15,7 @@ namespace Stats {
public:
/** ctor */
Average() : cnt(0), sum(0) {
Average() : cnt(0), sum() {
;
}
@@ -33,7 +33,7 @@ namespace Stats {
/** get the current value */
Scalar get() const {
Assert::isNot0(cnt, "add() values first!");
return sum / (Scalar)cnt;
return sum / cnt;
}
};

View File

@@ -2,6 +2,7 @@
#define STATS_MAXIMUM_H
#include "../../Assertions.h"
#include <limits>
namespace Stats {
@@ -9,7 +10,7 @@ namespace Stats {
private:
const Scalar START = -99999999;
const Scalar START = std::numeric_limits<Scalar>::lowest();
Scalar curMax;
public:

View File

@@ -1,13 +1,15 @@
#ifndef STATS_MINIMUM_H
#define STATS_MINIMUM_H
#include <limits>
namespace Stats {
template <typename Scalar> class Minimum {
private:
const Scalar START = +999999999;
const Scalar START = std::numeric_limits<Scalar>::max();
Scalar curMin;
public: