« Return to Thread: boost::random distribution is not working within a custom class

Re: boost::random distribution is not working within a custom class

by Bugzilla from janitor048@googlemail.com :: Rate this Message:

Reply to Author | View in Thread



randomNumberGenerator::randomNumberGenerator( const uint32_t s )
{
 boost::uniform_01<boost::mt19937&, double> * ran_boost = new
boost::uniform_01<boost::mt19937&, double>( rng_mt_boost );
 rng_mt_boost.seed( s );
 

You're creating a local variable here, not initializing the
member ran_boost.

Oh, what a stupid mistake!  Thanks for pointing it out so quickly.

Cheers,
Oliver


_______________________________________________
Boost-users mailing list
Boost-users@...
http://lists.boost.org/mailman/listinfo.cgi/boost-users

 « Return to Thread: boost::random distribution is not working within a custom class