1 #ifndef STAN_MATH_PRIM_SCAL_PROB_BINOMIAL_RNG_HPP 2 #define STAN_MATH_PRIM_SCAL_PROB_BINOMIAL_RNG_HPP 4 #include <boost/random/binomial_distribution.hpp> 5 #include <boost/random/variate_generator.hpp> 44 using boost::variate_generator;
45 using boost::binomial_distribution;
47 static const char*
function(
"binomial_rng");
54 variate_generator<RNG&, binomial_distribution<> >
void check_finite(const char *function, const char *name, const T_y &y)
Check if y is finite.
void check_less_or_equal(const char *function, const char *name, const T_y &y, const T_high &high)
Check if y is less or equal to high.
void check_nonnegative(const char *function, const char *name, const T_y &y)
Check if y is non-negative.
void check_greater_or_equal(const char *function, const char *name, const T_y &y, const T_low &low)
Check if y is greater or equal than low.
int binomial_rng(int N, double theta, RNG &rng)
Return a pseudorandom Binomial random variable for the given population size and chance of success pa...