Boost logo

Boost Users :

Subject: Re: [Boost-users] [Math/Statistical Distributions+Random] Random number generation
From: Marco Guazzone (marco.guazzone_at_[hidden])
Date: 2009-08-20 04:16:07


On Sun, Aug 16, 2009 at 7:45 AM, er<erwann.rogard_at_[hidden]> wrote:
> Marco Guazzone wrote:
>
>> I think a function like this below would be very helpful:
>> --- [snip] ---
>> template <typename Generator, typename RealType, typename Policy>
>> inline RealType rand(Generator& rng, const
>> exponential_distribution<RealType, Policy>& dist)
>> {
>>  return -1.0 / dist.lambda() * std::log(1.0-rng());
>> }
>
> Here's something similar:
> https://svn.boost.org/svn/boost/sandbox/statistics/dist_random/
>

Thank you!
I've taken a look... Very interesting.

But. why using different statistical distribution classes

#include <boost/standard_distribution/distributions/gamma.hpp>

instead of the ones included in boost

#include <boost/math/distributions/gamma.hpp>

?

What I mean is that I think an integration between Boost.Random and
Boost.StatisticalDistribution would be very useful for users

-- Marco


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