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

◆ bernoulli_rng()

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

Return a Bernoulli random variate with specified chance of success parameter using the specified random number generator.

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

Template Parameters
T_thetatype of chance of success parameter
RNGtype of random number generator
Parameters
theta(Sequence of) chance of success parameter(s)
rngrandom number generator
Returns
(Sequence of) Bernoulli random variate(s)
Exceptions
std::domain_errorif chance of success parameter is less than zero or greater than one.

Definition at line 29 of file bernoulli_rng.hpp.