Scythe-1.0.3
template<class RNGTYPE>
double scythe::rng< RNGTYPE >::rtnorm ( double  mean,
double  variance,
double  below,
double  above 
) [inline]

Generate a truncated normally distributed random variate.

This function returns a pseudo-random variate drawn from the normal distribution with given mean and variance, truncated both above and below. It uses the inverse CDF method.

Parameters:
meanThe mean of the distribution.
varianceThe variance of the distribution.
belowThe lower truncation point of the distribution.
aboveThe upper truncation point of the distribution.
See also:
rtnorm_combo(double mean, double variance, double below, double above)
rtbnorm_slice(double mean, double variance, double below, unsigned int iter = 10)
rtanorm_slice(double mean, double variance, double above, unsigned int iter = 10)
rtbnorm_combo(double mean, double variance, double below, unsigned int iter = 10)
rtanorm_combo(double mean, double variance, double above, unsigned int iter = 10)
rnorm(double x, double mean, double sd)
Exceptions:
scythe_invalid_arg(Level 1)

Referenced by scythe::rng< mersenne >::rtanorm_combo(), and scythe::rng< mersenne >::rtbnorm_combo().