Login  Register

MersenneTwisterUniformRng

classic Classic list List threaded Threaded
1 message Options Options
Embed post
Permalink
Reply | Threaded
Open this post in threaded view
| More
Print post
Permalink

MersenneTwisterUniformRng

Michael Dirkmann
8 posts
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