new test cases

worked on all walkers
new helper methods
new distributions
some bugfixes
This commit is contained in:
2016-02-02 21:43:15 +01:00
parent ec86b07c43
commit 2e2c1a3004
18 changed files with 363 additions and 41 deletions

View File

@@ -0,0 +1,38 @@
#ifndef UNIFORM_H
#define UNIFORM_H
#include <cmath>
#include <random>
namespace Distribution {
/** uniform distribution */
template <typename T> class Uniform {
private:
std::minstd_rand gen;
std::uniform_real_distribution<T> dist;
public:
/** ctor */
Uniform(const T min, const T max) :
gen(1234), dist(min, max) {
}
/** get a uniformaly distributed random number */
T draw() {
return dist(gen);
}
/** set the seed to use */
void setSeed(const long seed) {
gen.seed(seed);
}
};
}
#endif // UNIFORM_H