Boost logo

Boost Users :

Subject: Re: [Boost-users] Boost random not looking so random
From: Robin Rowe (robin_at_[hidden])
Date: 2012-10-28 05:39:27


> If you want to measure the randomness of something...

No, that wasn't my question. I just want to know if I'm using boost
random correctly/optimally in my code below. Are there any programmers
here who can answer that?

On 10/27/2012 9:30 PM, Robin Rowe wrote:
>
> boost::random::mt19937 rng;
> boost::minstd_rand lcggen;
> lcggen.seed(clockTime);
> rng.seed(lcggen);
> unsigned min=1;
> unsigned max=15;
> for(unsigned i=0;i<5;i++)
> { boost::random::uniform_int_distribution<> dist(min,max);
> const int j = dist(rng);
> ... code that shuffles stuff using j ...
> min++;
> cout<<j<<' ';
> }
>

Thanks,

Robin

-- 
www.CinePaint.org

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net