Open G4m4 opened 10 years ago
When a loop body contain a random generation such as:
std::generate(data.begin(), data.end(), std::bind(kNormDistribution, kRandomGenerator));
The random engine actually gets reinitialised at each loop iteration, resulting in the data being the same at each iteration. This has to be fixed.
This may be fixed by using a lambda:
std::generate(data.begin(), data.end(), [&] {return kNormDistribution(kRandomGenerator);});
When a loop body contain a random generation such as:
The random engine actually gets reinitialised at each loop iteration, resulting in the data being the same at each iteration. This has to be fixed.