Function random_multinomial(long long int, const std::vector<double>&)#
Defined in File random.cpp
Function Documentation#
-
std::vector<long long int> random_multinomial(long long int n, const std::vector<double> &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] vector of probabilities for each outcome
- Returns:
A vector of the number of successes for each outcome (in the same order as the probabilities).