Class ModelSIRMixing¶
#include <sirmixing.hpp>
Inherits the following classes: epiworld::Model< EPI_DEFAULT_TSEQ >
Public Static Attributes¶
| Type | Name |
|---|---|
| const int | INFECTED = 1 |
| const int | RECOVERED = 2 |
| const int | SUSCEPTIBLE = 0 |
Public Functions¶
| Type | Name |
|---|---|
| ModelSIRMixing () |
|
| ModelSIRMixing (ModelSIRMixing< TSeq > & model, const std::string & vname, epiworld_fast_uint n, epiworld_double prevalence, epiworld_double contact_rate, epiworld_double transmission_rate, epiworld_double recovery_rate, std::vector< double > contact_matrix) Constructs a ModelSIRMixing object. |
|
| ModelSIRMixing (const std::string & vname, epiworld_fast_uint n, epiworld_double prevalence, epiworld_double contact_rate, epiworld_double transmission_rate, epiworld_double recovery_rate, std::vector< double > contact_matrix) Constructs a ModelSIRMixing object. |
|
| Model< TSeq > * | clone_ptr () |
| size_t | get_n_infected (size_t group) const |
| ModelSIRMixing< TSeq > & | initial_states (std::vector< double > proportions_, std::vector< int > queue_={}) Set the initial states of the model. |
| void | reset () |
| ModelSIRMixing< TSeq > & | run (epiworld_fast_uint ndays, int seed=-1) |
| void | set_contact_matrix (std::vector< double > cmat) |
Public Static Attributes Documentation¶
variable INFECTED¶
variable RECOVERED¶
variable SUSCEPTIBLE¶
Public Functions Documentation¶
function ModelSIRMixing [1/3]¶
function ModelSIRMixing [2/3]¶
Constructs a ModelSIRMixing object.
inline ModelSIRMixing::ModelSIRMixing (
ModelSIRMixing < TSeq > & model,
const std::string & vname,
epiworld_fast_uint n,
epiworld_double prevalence,
epiworld_double contact_rate,
epiworld_double transmission_rate,
epiworld_double recovery_rate,
std::vector< double > contact_matrix
)
Template for a Susceptible-Exposed-Infected-Removed (SEIR) model.
Parameters:
modelA reference to an existing ModelSIRMixing object.vnameThe name of the ModelSIRMixing object.nThe number of entities in the model.prevalenceThe initial prevalence of the disease in the model.contact_rateThe contact rate between entities in the model.transmission_rateThe transmission rate of the disease in the model.recovery_rateThe recovery rate of the disease in the model.contact_matrixThe contact matrix between entities in the model.modelA Model<TSeq> object where to set up the SIR.vnamestd::string Name of the virusprevalenceInitial prevalence (proportion)contact_rateAverage number of contacts (interactions) per step.transmission_rateProbability of transmissionrecovery_rateProbability of recovery
function ModelSIRMixing [3/3]¶
Constructs a ModelSIRMixing object.
inline ModelSIRMixing::ModelSIRMixing (
const std::string & vname,
epiworld_fast_uint n,
epiworld_double prevalence,
epiworld_double contact_rate,
epiworld_double transmission_rate,
epiworld_double recovery_rate,
std::vector< double > contact_matrix
)
Parameters:
vnameThe name of the ModelSIRMixing object.nThe number of entities in the model.prevalenceThe initial prevalence of the disease in the model.contact_rateThe contact rate between entities in the model.transmission_rateThe transmission rate of the disease in the model.recovery_rateThe recovery rate of the disease in the model.contact_matrixThe contact matrix between entities in the model.
function clone_ptr¶
function get_n_infected¶
function initial_states¶
Set the initial states of the model.
inline ModelSIRMixing < TSeq > & ModelSIRMixing::initial_states (
std::vector< double > proportions_,
std::vector< int > queue_={}
)
Parameters:
proportions_Double vector with a single element:- The proportion of non-infected individuals who have recovered.
function reset¶
function run¶
function set_contact_matrix¶
The documentation for this class was generated from the following file include/epiworld/models/sirmixing.hpp