Defines the disease measure table data type.
More...
#include <disease_table.h>
|
| DiseaseTable ()=delete |
|
| DiseaseTable (const core::DiseaseInfo &info, std::map< std::string, int > &&measures, std::map< int, std::map< core::Gender, DiseaseMeasure >> &&data) |
| Initialise a new instance of the DiseaseTable class. More...
|
|
const core::DiseaseInfo & | info () const noexcept |
| Gets the disease information. More...
|
|
std::size_t | size () const noexcept |
| Gets the total size of the table, number of measure cells. More...
|
|
std::size_t | rows () const noexcept |
| Gets the number of rows, age. More...
|
|
std::size_t | cols () const noexcept |
| Gets the number of columns, gender. More...
|
|
bool | contains (const int age) const noexcept |
| Defines whether the table contains a given age. More...
|
|
const std::map< std::string, int > & | measures () const noexcept |
| Gets the measures to identifier mapping. More...
|
|
const int & | at (const std::string &measure) const |
| Gets a measure identifier by name. More...
|
|
const int & | operator[] (const std::string &measure) const |
| Gets a measure identifier by name. More...
|
|
DiseaseMeasure & | operator() (const int age, const core::Gender gender) |
| Lookup for the disease measure entries by age and gender. More...
|
|
const DiseaseMeasure & | operator() (const int age, const core::Gender gender) const |
| Lookup for the disease measure entries by age and gender. More...
|
|
Defines the disease measure table data type.
Lookup table by age and gender to access multiple disease measures.
◆ DiseaseTable() [1/2]
hgps::DiseaseTable::DiseaseTable |
( |
| ) |
|
|
delete |
◆ DiseaseTable() [2/2]
Initialise a new instance of the DiseaseTable class.
- Parameters
-
info | The disease information |
measures | Diseases measure to identifier mapping |
data | Disease measure table dataset |
◆ at()
const int & hgps::DiseaseTable::at |
( |
const std::string & |
measure | ) |
const |
Gets a measure identifier by name.
- Parameters
-
- Returns
- Measure identifier
- Exceptions
-
std::out_of_range | for unknown measure name |
◆ cols()
std::size_t hgps::DiseaseTable::cols |
( |
| ) |
const |
|
noexcept |
Gets the number of columns, gender.
- Returns
- NUmber of columns
◆ contains()
bool hgps::DiseaseTable::contains |
( |
const int |
age | ) |
const |
|
noexcept |
Defines whether the table contains a given age.
- Parameters
-
- Returns
- true if the age entry exists; otherwise, false.
◆ info()
Gets the disease information.
- Returns
- Disease information
◆ measures()
const std::map< std::string, int > & hgps::DiseaseTable::measures |
( |
| ) |
const |
|
noexcept |
Gets the measures to identifier mapping.
- Returns
- Measures identifiers
◆ operator()() [1/2]
Lookup for the disease measure entries by age and gender.
- Parameters
-
age | The age to lookup |
gender | The gender to lookup |
- Returns
- Disease measures collection
- Exceptions
-
std::out_of_range | for unknown age or gender enumeration |
◆ operator()() [2/2]
Lookup for the disease measure entries by age and gender.
- Parameters
-
age | The age to lookup |
gender | The gender to lookup |
- Returns
- Disease measures collection
- Exceptions
-
std::out_of_range | for unknown age or gender enumeration |
◆ operator[]()
const int & hgps::DiseaseTable::operator[] |
( |
const std::string & |
measure | ) |
const |
Gets a measure identifier by name.
- Parameters
-
- Returns
- Measure identifier
- Exceptions
-
std::out_of_range | for unknown measure name |
◆ rows()
std::size_t hgps::DiseaseTable::rows |
( |
| ) |
const |
|
noexcept |
Gets the number of rows, age.
- Returns
- Number of rows
◆ size()
std::size_t hgps::DiseaseTable::size |
( |
| ) |
const |
|
noexcept |
Gets the total size of the table, number of measure cells.
- Returns
- Total table size
The documentation for this class was generated from the following files: