24 double u =
randu(rng);
25 return rgamma (1.0 + a,rng) *
pow (u, 1.0 / a);
29 double d = a - 1.0 / 3.0;
30 double c = (1.0 / 3.0) /
sqrt (d);
43 if (u < (1 - 0.0331 * x * x * x * x))
46 if (
log (u) < (0.5 * x * x + d * (1 - v +
log (v))))
double randu(const random_number_generator &rng)
Uniform random number generator.
Description not yet available.
d3_array sqrt(const d3_array &arr3)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
Description not yet available.
double randn(const random_number_generator &rng)
Normal number generator.
d3_array log(const d3_array &arr3)
Author: David Fournier Copyright (c) 2008-2012 Regents of the University of California.
d3_array pow(const d3_array &m, int e)
Description not yet available.
double rgamma(double alpha, random_number_generator &rng)
Copyright (c) 2016 ADMB Foundation.