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

◆ multinomial_rng()

template<class T_theta , class RNG , require_eigen_col_vector_t< T_theta > * = nullptr>
std::vector< int > stan::math::multinomial_rng ( const T_theta &  theta,
int  N,
RNG &  rng 
)
inline

Return a draw from a Multinomial distribution given a probability simplex, a total count, and a pseudo-random number generator.

Template Parameters
RNGType of pseudo-random number generator.
Parameters
thetaVector of normalized probabilities.
NTotal count.
rngPseudo-random number generator.
Returns
Multinomial random variate.
Exceptions
std::domain_errorif theta is not a simplex.
std::domain_erroris N is less than 0.

Definition at line 28 of file multinomial_rng.hpp.