new geo functions

changed the walkers
added moving average
fixed the interpolator
new test-cases
This commit is contained in:
2016-01-30 19:49:18 +01:00
parent da0bd43fe0
commit ec86b07c43
8 changed files with 185 additions and 15 deletions

View File

@@ -0,0 +1,21 @@
#ifdef WITH_TESTS
#include "../Tests.h"
#include "../../math/MovingAVG.h"
TEST(MovingAVG, add) {
MovingAVG<float> avg(3);
avg.add(1); ASSERT_EQ(1, avg.get());
avg.add(1); ASSERT_EQ(1, avg.get());
avg.add(1); ASSERT_EQ(1, avg.get());
avg.add(4); ASSERT_EQ(2, avg.get());
avg.add(4); ASSERT_EQ(3, avg.get());
avg.add(4); ASSERT_EQ(4, avg.get());
}
#endif