|
Boost Users : |
Subject: Re: [Boost-users] [Math/Statistical Distributions+Random] Random number generation
From: er (erwann.rogard_at_[hidden])
Date: 2009-08-21 22:22:35
Marco Guazzone wrote:
>
> Thank you!
> I've taken a look... Very interesting.
Thanks.
>
> But. why using different statistical distribution classes
>
> #include <boost/standard_distribution/distributions/gamma.hpp>
>
This file does not define a new gamma distribution, only extra, non
overlapping functionality. For example, you can map the gamma
distribution to the gamma random engine :
typedef boost::math::gamma_distribution<T,P> gamma_;
typedef dist_random< gamma_ > meta;
typedef meta::type random_;
gamma_ gamma(5.0);
random_ r = meta::make(gamma);
> What I mean is that I think an integration between Boost.Random and
> Boost.StatisticalDistribution would be very useful for users
Perhaps, but it's not under my control. Anyhow, if you do e.g
generate_n(it,n,gamma,urng);
the interface make no reference to boost/random (hidden in implementation)
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