Hi,
I'm trying to use the C++ STD TechnicalReport1 extensions to generate numbers following a normal distributions, but this code (adapted from this article):
mt19937 eng;
eng.seed(SEED);
normal_distribution<double> dist;
// XXX if I use the one below it exits the for loop
// uniform_int<int> dist(1, 52);
for (unsigned int i = 0; i < 1000; ++i) {
cout << "Generating " << i << "-th value" << endl;
cout << dist(eng) << endl;
}
only prints 1 "Generating..." log message, the it never exists the for loop! If I change the distribution (ie. with the commented uniform distribution), it terminated, so I'm worndering what I'm doing wrong.. Any idea?
Thanks a lot