1
0
mirror of https://github.com/aportelli/LatAnalyze.git synced 2026-01-02 01:39:27 +00:00

internal random generator entirely removed, use C++11 generators

This commit is contained in:
2016-04-06 20:04:23 +01:00
parent 984947c677
commit 3611d12fa9
20 changed files with 71 additions and 1044 deletions

View File

@@ -19,7 +19,6 @@
#include <iostream>
#include <LatAnalyze/Io.hpp>
#include <LatAnalyze/RandGen.hpp>
using namespace std;
using namespace Latan;
@@ -42,8 +41,10 @@ int main(int argc, char *argv[])
nSample = strTo<Index>(argv[3]);
outFileName = argv[4];
RandGen gen;
DSample res(nSample);
random_device rd;
mt19937 gen(rd());
normal_distribution<> dis(val, err);
DSample res(nSample);
FOR_STAT_ARRAY(res, s)
{
@@ -53,7 +54,7 @@ int main(int argc, char *argv[])
}
else
{
res[s] = gen.gaussian(val, err);
res[s] = dis(gen);
}
}
Io::save<DSample>(res, outFileName);