Boost logo

Boost Users :

Subject: [Boost-users] :typedef mt19937, normal_distribution, variate_generator & data storage into vector
From: It neophyte (phdlux85_at_[hidden])
Date: 2014-12-14 10:52:58

hi all,

does someone know why my vstore vector returns a 0 value? any suggestion to
improve the code would be appreciated.cheers.
*aim*: *generating 260 random numbers following a standard normal
distribution, then store the values into a vector (here: vstore)*


typedef mt19937 ALEA;
typedef normal_distribution<double> STGAUSSIAN;
typedef variate_generator<ALEA,STGAUSSIAN> GENALEA;

ALEA ale;
STGAUSSIAN stgauss(0,1);
GENALEA gen(ale,stgauss);

for (int i=0;i<=260;i++)

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at