refactored random subsystem
added compile-time seed support
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
|
||||
#include <cmath>
|
||||
#include <random>
|
||||
|
||||
#include "../Random.h"
|
||||
|
||||
namespace Distribution {
|
||||
|
||||
@@ -14,13 +14,13 @@ namespace Distribution {
|
||||
|
||||
const T lambda;
|
||||
|
||||
std::minstd_rand gen;
|
||||
RandomGenerator gen;
|
||||
std::exponential_distribution<T> dist;
|
||||
|
||||
public:
|
||||
|
||||
/** ctor */
|
||||
Exponential(const T lambda) : lambda(lambda), dist(lambda) {
|
||||
Exponential(const T lambda) : lambda(lambda), gen(RANDOM_SEED), dist(lambda) {
|
||||
;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user