|
template<class RNGTYPE>
double scythe::rng< RNGTYPE >::rtanorm_slice |
( |
double |
mean, |
|
|
double |
variance, |
|
|
double |
above, |
|
|
unsigned int |
iter = 10 |
|
) |
| [inline] |
Generate a normally distributed random variate, truncated above.
This function returns a pseudo-random variate drawn from the normal distribution with given mean and variance, truncated above. It uses the slice sampling method of Robert and Casella (1999), pp. 288-289.
- Parameters:
-
mean | The mean of the distribution. |
variance | The variance of the distribution. |
above | The upper truncation point of the distribution. |
iter | The number of iterations to use. |
- See also:
- rtnorm(double mean, double variance, double below, double above)
-
rtnorm_combo(double mean, double variance, double below, double above)
-
rtbnorm_slice(double mean, double variance, double below, 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:
-
|