Boost logo

Boost Users :

Subject: Re: [Boost-users] Random: Using random generators with runtime parameters
From: Tim Keitt (tkeitt_at_[hidden])
Date: 2008-11-22 20:39:42

Matthias Troyer <troyer <at>> writes:

> 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
> Distributions in Boost.Random do just that.
> Matthias


just noticed your reply. Could you provide and example.
All I see is eg variate = lognormal_distribution(mean, var)().
Is that what you had in mind? It seems odd that the parameters
are provided as arguments to a constructor rather than a
simple function call.


Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at