Stride Reference Manual
1.0
|
Initializes Population objects. More...
#include <PopulationBuilder.h>
Static Public Member Functions | |
static std::shared_ptr< Population > | build (const boost::property_tree::ptree &pt_config, const boost::property_tree::ptree &pt_disease, const boost::property_tree::ptree &pt_pop, util::Random &rng) |
Initializes a Population: add persons, set immunity, seed infection. More... | |
Static Private Member Functions | |
static std::vector< double > | getDistribution (const boost::property_tree::ptree &pt_root, const std::string &xml_tag) |
Get distribution associateed with tag values. More... | |
static unsigned int | sample (util::Random &rng, const std::vector< double > &distribution) |
Sample from the distribution. More... | |
Initializes Population objects.
Definition at line 38 of file PopulationBuilder.h.
|
static |
Initializes a Population: add persons, set immunity, seed infection.
pt_config | Property_tree with generalconfiguration settings. |
pt_disease | Property_tree with disease configuration settings. |
Definition at line 35 of file PopulationBuilder.cpp.
References stride::util::InstallDirs::getDataDir(), stride::Person< BehaviourPolicy, BeliefPolicy >::getHealth(), stride::Person< BehaviourPolicy, BeliefPolicy >::isParticipatingInSurvey(), stride::Health::isSusceptible(), stride::Person< BehaviourPolicy, BeliefPolicy >::participateInSurvey(), stride::Health::setImmune(), stride::util::StringUtils::split(), and stride::Health::startInfection().
|
staticprivate |
Get distribution associateed with tag values.
Definition at line 165 of file PopulationBuilder.cpp.
|
staticprivate |
Sample from the distribution.
Definition at line 174 of file PopulationBuilder.cpp.
References stride::util::Random::nextDouble().