Print

Print


Sean,

Iím guessing that I can use nextInt() to flush out possible order on a new instance of MersenneTwister, even if Iím going to be calling nextDouble() or nextGaussian() on it afterwards, i.e it doesnít matter which nextX() function I use to pulse the instance.  Is that correct?  (I tried to figure this out from a glance at the source, but immediately realized that I was not going to be able to answer my question without a great deal of study. :-)

Thanks-
Marshall

> On Sep 6, 2016, at 8:04 AM, Sean Luke <[log in to unmask]> wrote:
> 
> On Sep 5, 2016, at 11:31 PM, Sean Luke <[log in to unmask]> wrote:
> 
>> 	int q = 0;
>> 	do { q = oldMersenneTwister.nextInt(); } while (q == 0);
>> 	a = new MersenneTwister(q);
>> 	for(int i = 0; i < 624 * 2; i++) a.nextInt();
>> 	do { q = oldMersenneTwister.nextInt(); } while (q == 0);
>> 	b = new MersenneTwister(q);
>> 	for(int i = 0; i < 624 * 2; i++) b.nextInt();
>> 	do { q = oldMersenneTwister.nextInt(); } while (q == 0);
>> 	c = new MersenneTwister(oldMersenneTwister.nextInt());
>> 	for(int i = 0; i < 624 * 2; i++) c.nextInt();
> 
> Error in second to last line.  This comes from staying up too late.  Let me try again:
> 
> 	int q = 0;
> 	do { q = oldMersenneTwister.nextInt(); } while (q == 0);
> 	a = new MersenneTwister(q);
> 	for(int i = 0; i < 624 * 2; i++) a.nextInt();
> 	do { q = oldMersenneTwister.nextInt(); } while (q == 0);
> 	b = new MersenneTwister(q);
> 	for(int i = 0; i < 624 * 2; i++) b.nextInt();
> 	do { q = oldMersenneTwister.nextInt(); } while (q == 0);
> 	c = new MersenneTwister(q);
> 	for(int i = 0; i < 624 * 2; i++) c.nextInt();
> 
> Sean
> 
>