Boost logo

Boost Users :

Subject: [Boost-users] random: uniform_01 usage and mixing boost::random with boost::math::normal
From: Hicham Mouline (hicham_at_[hidden])
Date: 2010-02-16 09:07:26


Hello,

I have this code:

        boost::mt19937 mers;
        boost::uniform_01<boost::mt19937> uf01(mers);
        boost::exponential_distribution<> ed(0.1);

I call the operator() on uf01 3 million times, as
   uf01()

I don't quite understand the warning in the documentation about the
constructor taking the generator by value.
This means that my mers doesn't change between calls to uf01().
Is this bad? Will it affect the quality of the randomness of the uniform
numbers generated?

I also have
        boost::math::normal nrm;
and I use
        boost::math::cdf(nrm, ¡­)
and
        boost::math::quantile( nrm, ¡­ );

Are there any issues with using both boost¡Ëmath¡Ënormal and other
distributions from the boost¡Ërandom library?

Regards,



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