1 #ifndef STAN_MATH_PRIM_SCAL_PROB_UNIFORM_RNG_HPP 2 #define STAN_MATH_PRIM_SCAL_PROB_UNIFORM_RNG_HPP 4 #include <boost/random/uniform_real_distribution.hpp> 5 #include <boost/random/variate_generator.hpp> 23 using boost::variate_generator;
24 using boost::random::uniform_real_distribution;
26 static const char*
function(
"uniform_rng");
30 check_greater(
function,
"Upper bound parameter", beta, alpha);
32 variate_generator<RNG&, uniform_real_distribution<> >
33 uniform_rng(rng, uniform_real_distribution<>(alpha, beta));
void check_finite(const char *function, const char *name, const T_y &y)
Check if y is finite.
void check_greater(const char *function, const char *name, const T_y &y, const T_low &low)
Check if y is strictly greater than low.
double uniform_rng(double alpha, double beta, RNG &rng)