aboutsummaryrefslogtreecommitdiffstats
path: root/src/var_alea.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/var_alea.hpp')
-rw-r--r--src/var_alea.hpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/var_alea.hpp b/src/var_alea.hpp
index 2d1e8a6..cba365a 100644
--- a/src/var_alea.hpp
+++ b/src/var_alea.hpp
@@ -7,9 +7,8 @@ extern "C" {
#include <ctime>
-void init_alea(unsigned seed = static_cast<unsigned>(std::time(0))) {
- init_genrand(seed);
-};
+void init_alea(unsigned seed = static_cast<unsigned>(std::time(0)));
+
template <typename T>
struct var_alea {
@@ -49,7 +48,7 @@ struct expo : public var_alea<double>
struct gaussian : public var_alea<double>
{
gaussian(double mean = 0, double std = 1)
- : mean(mean), std(std), flag(true), unif(-1,1) {};
+ : mean(mean), std(std), unif(-1,1), flag(true) {};
double operator()() {
flag = !flag;
if (!flag) {