
15 Aug
2009
15 Aug
'09
11:45 p.m.
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/