Boost logo

Boost Users :

From: Hossein Haeri (powerprogman_at_[hidden])
Date: 2004-12-24 05:17:04


Dear all,

Using the following (slightly manipulated) sample code
of Boost.Random, I'm always gettig the same sequence:

boost::mt19937 rng;
boost::uniform_int<> six(1,6);
boost::variate_generator<boost::mt19937,
                         boost::uniform_int<> >
           die(rng, six);
for(size_t i = 0; i < 10; ++i)
  cout << die() << " ";

I know that this is the consequence of the fact that
the generators are deterministic ones, plus another
fact that they start using the same seed.

This behaviour, however, is not that much desirable,
and I'm seaking some sort of good random seed. Any
suggestions?

TIA and Merry Christmas,
--Hossein

        
                
__________________________________
Do you Yahoo!?
Yahoo! Mail - You care about security. So do we.
http://promotions.yahoo.com/new_mail


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