Automatic Differentiation
 
Loading...
Searching...
No Matches

◆ binomial_rng()

template<typename T_N , typename T_theta , class RNG >
VectorBuilder< true, int, T_N, T_theta >::type stan::math::binomial_rng ( const T_N &  N,
const T_theta &  theta,
RNG &  rng 
)
inline

Return a pseudorandom binomial random variable for the given population size and chance of success parameters using the specified random number generator.

beta can be a scalar or a one-dimensional container.

Template Parameters
T_NType of population size parameter
T_thetaType of change of success parameter
RNGclass of rng
Parameters
N(Sequence of) population size parameter(s)
theta(Sequence of) chance of success parameter(s)
rngrandom number generator
Returns
(Sequence of) binomial random variate(s)
Exceptions
std::domain_errorif N is negative
std::domain_errorif theta is not a valid probability

Definition at line 32 of file binomial_rng.hpp.