File distributions.hpp¶
FileList > epiworld > math > distributions.hpp
Go to the source code of this file
Public Functions¶
| Type | Name |
|---|---|
| double | dgenint (int g, double S, double p_c, double p_i, double p_r, double & p_0_approx, double & normalizing, int max_contacts=200, int max_days=200) Compute the probability of the generation interval. |
| double | dpois (int k, double lambda, int max_n=100, bool as_log=false) Compute the Poisson probability. |
| double | gen_int_mean (double S, double p_c, double p_i, double p_r, int max_days=200, int max_n=200) Compute the mean of the generation interval. |
| double | log_factorial (int n) Compute the log of the factorial. |
Public Functions Documentation¶
function dgenint¶
Compute the probability of the generation interval.
inline double dgenint (
int g,
double S,
double p_c,
double p_i,
double p_r,
double & p_0_approx,
double & normalizing,
int max_contacts=200,
int max_days=200
)
If p_0_approx is negative, it will be computed using the Poisson distribution. If normalizing is negative, it will be computed on the fly
Parameters:
gGeneration intervalSPopulation sizep_cProbability of contactp_iProbability of infectionp_rProbability of recoveryp_0_approxApproximation of the probability of not being infectednormalizingNormalizing constantmax_contactsMaximum number of contactsmax_daysMaximum number of days
Returns:
The probability of the generation interval
function dpois¶
Compute the Poisson probability.
Parameters:
kNumber of eventslambdaRatemax_nMaximum number of eventsas_logReturn the log of the probability
Returns:
The Poisson probability
function gen_int_mean¶
Compute the mean of the generation interval.
inline double gen_int_mean (
double S,
double p_c,
double p_i,
double p_r,
int max_days=200,
int max_n=200
)
Parameters:
SPopulation size.p_cProbability of contact.p_iProbability of infection.p_rProbability of recovery.max_daysMaximum number of days.max_nMaximum number of contacts.
Returns:
The mean of the generation interval
function log_factorial¶
Compute the log of the factorial.
Parameters:
nNumber
Returns:
The log of the factorial
The documentation for this class was generated from the following file epiworld-src/include/epiworld/math/distributions.hpp