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

◆ neg_binomial_2_rng()

template<typename T_loc , typename T_prec , class RNG >
VectorBuilder< true, int, T_loc, T_prec >::type stan::math::neg_binomial_2_rng ( const T_loc &  mu,
const T_prec &  phi,
RNG &  rng 
)
inline

Return a negative binomial random variate with the specified location and precision parameters using the given random number generator.

mu and phi can each be a scalar or a one-dimensional container. Any non-scalar inputs must be the same size.

Template Parameters
T_loctype of location parameter
T_prectype of precision parameter
RNGtype of random number generator
Parameters
mu(Sequence of) positive location parameter(s)
phi(Sequence of) positive precision parameter(s)
rngrandom number generator
Returns
(Sequence of) negative binomial random variate(s)
Exceptions
std::domain_errorif mu or phi are nonpositive
std::invalid_argumentif non-scalar arguments are of different sizes

Definition at line 36 of file neg_binomial_2_rng.hpp.