
On 25 Mar 2008, at 19:53, Tim Keitt wrote:
I've often wondered this myself (not the how, but the why). This is a rather odd feature of the Boost Random library. Most libraries would have a function list "rnorm(mean, std)" which would return a random deviate with the specified mean and standard deviation. Changing these at runtime is important for many kinds of simulation. You can of course define these yourself eg
double rnorm(double mean, double std) { return std * rnorm01() + mean; }
where rnorm01() returns deviates with unit scaling and zero mean. This works if the scaled distribution is affine to the original, but does not work otherwise (if the distribution changes shape with the parameters).
This is an area where Boost Random needs some TLC. Good idea for a SoC project!
Distributions in Boost.Random do just that. Matthias