|
Hi,
I am intersted in the rational for chosing the implementation of
MersenneTwisterUniformRng with "Size mti" being static. This choice
leads to different random sequences for the cases sketched below.
My prefered behavior would result when "Size mti" was static. But there
probably is a good reason for not doing so.
// ----------------
MersenneTwisterUniformRng mt1(42);
MersenneTwisterUniformRng mt2(42);
#ifdef A
for (int i = 0; i < 10; ++i)
cout << mt1.nextInt32() << endl;
for (int i = 0; i < 10; ++i)
cout << mt2.nextInt32() << endl;
#endif
#ifdef B
for (int i = 0; i < 10; ++i)
cout << mt1.nextInt32() << " " << mt2.nextInt32() << endl;
#endif
// ----------------
Regards
Michael
|