Return a draw from a Multinomial distribution given a vector of unnormalized log probabilities, a total count, and a pseudo-random number generator.
- Template Parameters
-
RNG | Type of pseudo-random number generator. |
- Parameters
-
beta | Vector of unnormalized log probabilities. |
N | Total count. |
rng | Pseudo-random number generator. |
- Returns
- Multinomial random variate.
- Exceptions
-
std::domain_error | if any element of beta is not finite. |
std::domain_error | is N is less than 0. |
Definition at line 29 of file multinomial_logit_rng.hpp.