Health-GPS
1.2.2.0
Global Health Policy Simulation model (Health-GPS)
|
Defines a virtual population person data type. More...
#include <person.h>
Public Member Functions | |
Person () | |
Initialise a new instance of the Person structure. More... | |
Person (const core::Gender gender) noexcept | |
Initialise a new instance of the Person structure. More... | |
std::size_t | id () const noexcept |
Gets this instance unique identifier. More... | |
bool | is_alive () const noexcept |
Determine if a Person is current alive. More... | |
bool | has_emigrated () const noexcept |
Determine if a Person has emigrated from the population. More... | |
unsigned int | time_of_death () const noexcept |
Gets the time of death, for dead, non-alive individuals only. More... | |
unsigned int | time_of_migration () const noexcept |
Gets the time of migration, for emigrated individuals only. More... | |
bool | is_active () const noexcept |
Gets a value indicating whether a Person is current active in the population. More... | |
double | get_risk_factor_value (const core::Identifier &key) const noexcept |
Gets a risk factor current value. More... | |
float | gender_to_value () const noexcept |
Gets the gender enumeration as a number for analysis. More... | |
std::string | gender_to_string () const noexcept |
Gets the gender enumeration name string. More... | |
void | emigrate (const unsigned int time) |
Emigrate this instance from the virtual population. More... | |
void | die (const unsigned int time) |
Mark this instance as dead. More... | |
Static Public Member Functions | |
static void | reset_id () |
Resets the unique identifier sequence to zero. More... | |
Public Attributes | |
core::Gender | gender {core::Gender::unknown} |
The assigned gender. More... | |
unsigned int | age {} |
Current age in years. More... | |
double | ses {} |
Social-economic status (SES) assigned value. More... | |
std::map< core::Identifier, double > | risk_factors |
Current risk factors values. More... | |
std::map< core::Identifier, Disease > | diseases |
Diseases history and current status. More... | |
Defines a virtual population person data type.
hgps::Person::Person | ( | ) |
Initialise a new instance of the Person structure.
|
noexcept |
Initialise a new instance of the Person structure.
gender | The new person gender |
void hgps::Person::die | ( | const unsigned int | time | ) |
Mark this instance as dead.
time | Death time |
std::logic_error | for attempting to set to non-active individuals. |
void hgps::Person::emigrate | ( | const unsigned int | time | ) |
Emigrate this instance from the virtual population.
time | Migration time |
std::logic_error | for attempting to set to non-active individuals. |
|
noexcept |
Gets the gender enumeration name string.
|
noexcept |
Gets the gender enumeration as a number for analysis.
|
noexcept |
Gets a risk factor current value.
key | The risk factor identifier |
|
noexcept |
Determine if a Person has emigrated from the population.
|
noexcept |
Gets this instance unique identifier.
|
noexcept |
Gets a value indicating whether a Person is current active in the population.
|
noexcept |
Determine if a Person is current alive.
|
static |
Resets the unique identifier sequence to zero.
|
noexcept |
Gets the time of death, for dead, non-alive individuals only.
|
noexcept |
Gets the time of migration, for emigrated individuals only.
unsigned int hgps::Person::age {} |
Current age in years.
std::map<core::Identifier, Disease> hgps::Person::diseases |
Diseases history and current status.
core::Gender hgps::Person::gender {core::Gender::unknown} |
The assigned gender.
std::map<core::Identifier, double> hgps::Person::risk_factors |
Current risk factors values.
double hgps::Person::ses {} |
Social-economic status (SES) assigned value.