Function random_multinomial(long long int, const std::array<double, constants::max_dev+1>&)#
Defined in File random.cpp
Function Documentation#
-
std::vector<long long int> random_multinomial(long long int n, const std::array<double, constants::max_dev + 1> &probs)
Returns a vector of outcomes from a random draw of the Multinomial distribution with N trials where each trial has a vector of probabilities probs.
- Parameters:
n – [in] number of trials
probs – [in] array of probabilities for each outcome (each age group)
- Returns:
A vector of the number of successes for each outcome (in the same order as the probabilities).