[cfe-dev] std::tr1::variate_generator

Florian Pflug fgp at phlo.org
Thu Apr 5 14:26:44 PDT 2012

On Apr5, 2012, at 23:00 , Fletcher, John P wrote:
>    std::tr1::mt19937 uint_gen;
>    std::tr1::uniform_real<double> uniform_dist;
>    std::tr1::variate_generator< std::tr1::mt19937, std::tr1::uniform_real<double> > uniform_gen;
>    std::tr1::normal_distribution<double> normal_dist;
>    std::tr1::variate_generator< std::tr1::mt19937, std::tr1::normal_distribution<double> > normal_gen;

You should be able to use the (presumably portable) implementation of TR1
included in Boost


The random number generation stuff seems to use Boost Random internally, which
I think it a header-only library.

best regards,
Florian Pflug

More information about the cfe-dev mailing list