|
Health-GPS 3.0.0.0
Global Health Policy Simulation model (Health-GPS)
|
Defines the Simulation results container for time series data. More...
#include <data_series.h>
Public Member Functions | |
| DataSeries ()=delete | |
| DataSeries (std::size_t sample_size) | |
| Initialises a new instance of the DataSeries class. | |
| std::vector< double > & | operator() (core::Gender gender, const std::string &key) |
| Gets a reference to a channel by Gender and identifier. | |
| std::vector< double > & | at (core::Gender gender, const std::string &key) |
| Gets a reference to a channel by Gender and identifier. | |
| const std::vector< double > & | at (core::Gender gender, const std::string &key) const |
| Gets a read-only reference to a channel by Gender and identifier. | |
| std::vector< double > & | at (core::Gender gender, core::Income income, const std::string &key) |
| Gets a reference to a channel by Gender, Income and identifier. | |
| const std::vector< double > & | at (core::Gender gender, core::Income income, const std::string &key) const |
| Gets a read-only reference to a channel by Gender, Income and identifier. | |
| const std::vector< std::string > & | channels () const noexcept |
| Gets the collection of channel identifiers. | |
| void | add_channel (std::string key) |
| Adds a new channel to the collection. | |
| void | add_channels (const std::vector< std::string > &keys) |
| Adds multiple channels to the collection. | |
| void | add_income_channels (const std::vector< std::string > &keys) |
| Adds income-based channels to the collection. | |
| void | add_income_channels_for_categories (const std::vector< std::string > &keys, const std::vector< core::Income > &income_categories) |
| Adds income-based channels for specific income categories. | |
| std::size_t | size () const noexcept |
| Gets the size of the channels collection. | |
| std::size_t | sample_size () const noexcept |
| Gets the channels sample size, number of points per channel. | |
| std::vector< core::Income > | get_available_income_categories () const |
| Gets available income categories from the data. | |
| bool | has_income_category (core::Gender gender, core::Income income) const |
| Checks if an income category exists for a given gender. | |
| bool | has_income_channel (core::Gender gender, core::Income income, const std::string &key) const |
| True if an income-stratified channel key exists (gender, income, key). | |
| std::string | income_category_to_string (core::Income income) const |
| Converts income category enum to string representation. | |
Defines the Simulation results container for time series data.
Channels with the time series result data are stored by Gender and Identifier. The collection of channels is dynamic, but all channels must contain exact the same number of data points, sample size, as given during initialisation.
|
delete |
| hgps::DataSeries::DataSeries | ( | std::size_t | sample_size | ) |
Initialises a new instance of the DataSeries class.
| sample_size | The channels sample size, number of data points. |
| void hgps::DataSeries::add_channel | ( | std::string | key | ) |
Adds a new channel to the collection.
| key | The new channel unique identifier |
| std::logic_error | for duplicated channel identifier |
| void hgps::DataSeries::add_channels | ( | const std::vector< std::string > & | keys | ) |
Adds multiple channels to the collection.
| keys | The new channels identifier |
| std::logic_error | for duplicated channel identifier |
| void hgps::DataSeries::add_income_channels | ( | const std::vector< std::string > & | keys | ) |
Adds income-based channels to the collection.
| keys | The new income-based channels identifier |
| std::logic_error | for duplicated channel identifier |
| void hgps::DataSeries::add_income_channels_for_categories | ( | const std::vector< std::string > & | keys, |
| const std::vector< core::Income > & | income_categories | ||
| ) |
Adds income-based channels for specific income categories.
| std::vector< double > & hgps::DataSeries::at | ( | core::Gender | gender, |
| const std::string & | key | ||
| ) |
Gets a reference to a channel by Gender and identifier.
| gender | The gender enumeration |
| key | The channel identifier |
| std::out_of_range | if the container does not have a channel with the specified age and key |
| const std::vector< double > & hgps::DataSeries::at | ( | core::Gender | gender, |
| const std::string & | key | ||
| ) | const |
Gets a read-only reference to a channel by Gender and identifier.
| gender | The gender enumeration |
| key | The channel identifier |
| std::out_of_range | if the container does not have a channel with the specified age and key |
| std::vector< double > & hgps::DataSeries::at | ( | core::Gender | gender, |
| core::Income | income, | ||
| const std::string & | key | ||
| ) |
Gets a reference to a channel by Gender, Income and identifier.
| gender | The gender enumeration |
| income | The income enumeration |
| key | The channel identifier |
| std::out_of_range | if the container does not have a channel with the specified gender, income and key |
| const std::vector< double > & hgps::DataSeries::at | ( | core::Gender | gender, |
| core::Income | income, | ||
| const std::string & | key | ||
| ) | const |
Gets a read-only reference to a channel by Gender, Income and identifier.
| gender | The gender enumeration |
| income | The income enumeration |
| key | The channel identifier |
| std::out_of_range | if the container does not have a channel with the specified gender, income and key |
|
noexcept |
Gets the collection of channel identifiers.
| std::vector< core::Income > hgps::DataSeries::get_available_income_categories | ( | ) | const |
Gets available income categories from the data.
| bool hgps::DataSeries::has_income_category | ( | core::Gender | gender, |
| core::Income | income | ||
| ) | const |
Checks if an income category exists for a given gender.
| gender | The gender enumeration |
| income | The income enumeration |
| bool hgps::DataSeries::has_income_channel | ( | core::Gender | gender, |
| core::Income | income, | ||
| const std::string & | key | ||
| ) | const |
True if an income-stratified channel key exists (gender, income, key).
| std::string hgps::DataSeries::income_category_to_string | ( | core::Income | income | ) | const |
Converts income category enum to string representation.
| income | The income enumeration |
| std::vector< double > & hgps::DataSeries::operator() | ( | core::Gender | gender, |
| const std::string & | key | ||
| ) |
Gets a reference to a channel by Gender and identifier.
| gender | The gender enumeration |
| key | The channel identifier |
| std::out_of_range | if the container does not have a channel with the specified age and key |
|
noexcept |
Gets the channels sample size, number of points per channel.
|
noexcept |
Gets the size of the channels collection.