
23 Oct
2007
23 Oct
'07
5 p.m.
I am little confused on how to see a random generator. What am I missing? // Grab the seed HighResTimer::Time time_secs = high_res_timer.getTime(); // Go ahead and truncate, it's just a seed boost::int32_t time = static_cast<boost::int32_t>(time_secs * 100000); // produces randomness out of thin air // see pseudo-random number generators boost::mt19937 rng; rng.seed(); // How do you seed this with the time? // distribution that maps to 0..1 // see random number distributions boost::uniform_real<> zero_to_one(0,1); // glues randomness with mapping boost::variate_generator<boost::mt19937&, boost::uniform_real<> > be_random zero_to_one);