
16 Aug
2009
16 Aug
'09
5:45 a.m.
Marco Guazzone wrote:
I think a function like this below would be very helpful: --- [snip] --- template
inline RealType rand(Generator& rng, const exponential_distribution & 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/