
On Sun, Aug 16, 2009 at 7:45 AM, er<erwann.rogard@gmail.com> 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