47 boost::normal_distribution<> dst(mean,
sqrt(var));
48 boost::variate_generator<
50 boost::normal_distribution<> > rand(gen, dst);
58 double amin = std::min(min, max);
59 double amax = std::max(min, max);
60 boost::uniform_real<> dst(amin, amax);
61 boost::variate_generator<
63 boost::uniform_real<> > rand(gen, dst);
double randomGaussian(double mean, double var, boost::mt19937 &gen)
Return a random value according to gaussian distribution. If variance is zero, it just returns mean...
INLINE Rall1d< T, V, S > sqrt(const Rall1d< T, V, S > &arg)
double randomUniform(double min, double max, boost::mt19937 &gen)
Return a random value according to uniform distribution.