1 #ifndef STAN_MATH_PRIM_SCAL_PROB_BETA_RNG_HPP
2 #define STAN_MATH_PRIM_SCAL_PROB_BETA_RNG_HPP
4 #include <boost/math/special_functions/gamma.hpp>
5 #include <boost/random/gamma_distribution.hpp>
6 #include <boost/random/variate_generator.hpp>
31 using boost::variate_generator;
32 using boost::random::gamma_distribution;
33 static const char*
function(
"beta_rng");
37 variate_generator<RNG&, gamma_distribution<> >
38 rng_gamma_alpha(rng, gamma_distribution<>(alpha, 1.0));
39 variate_generator<RNG&, gamma_distribution<> >
40 rng_gamma_beta(rng, gamma_distribution<>(beta, 1.0));
41 double a = rng_gamma_alpha();
42 double b = rng_gamma_beta();
double beta_rng(const double alpha, const double beta, RNG &rng)
bool check_positive_finite(const char *function, const char *name, const T_y &y)
Return true if y is positive and finite.