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

◆ neg_binomial_rng()

template<typename T_shape , typename T_inv , class RNG >
VectorBuilder< true, int, T_shape, T_inv >::type stan::math::neg_binomial_rng ( const T_shape &  alpha,
const T_inv &  beta,
RNG &  rng 
)
inline

Return a negative binomial random variate with the specified shape and inverse scale parameters using the given random number generator.

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

Template Parameters
T_shapetype of shape parameter
T_invtype of inverse scale parameter
RNGtype of random number generator
Parameters
alpha(Sequence of) positive shape parameter(s)
beta(Sequence of) positive inverse scale parameter(s)
rngrandom number generator
Returns
(Sequence of) negative binomial random variate(s)
Exceptions
std::domain_errorif alpha or beta are nonpositive
std::invalid_argumentif non-scalar arguments are of different sizes

Definition at line 35 of file neg_binomial_rng.hpp.