Stride Reference Manual
- generated for commit 9643b11
|
Processes the contacts between persons and determines whether transmission occurs. More...
#include <ContactHandler.h>
Public Member Functions | |
ContactHandler (std::function< double()> gen) | |
Constructor sets the transmission rate and random number generator. More... | |
double | operator() () |
Make a draw on the uniform generator. More... | |
bool | HasContactAndTransmission (double contact_rate, double transmission_probability) |
Check if two individuals have contact and transmission. More... | |
bool | HasContact (double contact_rate) |
Check if two individuals have contact. More... | |
bool | HasTransmission (double transmission_probability) |
Check whether transmission occurs. More... | |
Private Member Functions | |
double | RateToProbability (double rate) |
Convert rate into probability. More... | |
Private Attributes | |
std::function< double()> | m_uniform01_generator |
Random number generator: double in [0.0, 1.0) More... | |
Processes the contacts between persons and determines whether transmission occurs.
Definition at line 31 of file ContactHandler.h.
|
inlineexplicit |
Constructor sets the transmission rate and random number generator.
Definition at line 35 of file ContactHandler.h.
|
inline |
Make a draw on the uniform generator.
Definition at line 38 of file ContactHandler.h.
References m_uniform01_generator.
|
inline |
Check if two individuals have contact and transmission.
Definition at line 41 of file ContactHandler.h.
References m_uniform01_generator, and RateToProbability().
Referenced by stride::Infector< LL, TIC, true >::Exec().
|
inline |
Check if two individuals have contact.
Definition at line 47 of file ContactHandler.h.
References m_uniform01_generator, and RateToProbability().
Referenced by stride::Infector< LL, TIC, TO >::Exec().
|
inline |
Check whether transmission occurs.
Definition at line 50 of file ContactHandler.h.
References m_uniform01_generator.
Referenced by stride::Infector< LL, TIC, TO >::Exec().
Convert rate into probability.
Definition at line 57 of file ContactHandler.h.
Referenced by HasContact(), and HasContactAndTransmission().
|
private |
Random number generator: double in [0.0, 1.0)
Definition at line 60 of file ContactHandler.h.
Referenced by HasContact(), HasContactAndTransmission(), HasTransmission(), and operator()().