Health-GPS  1.2.2.0
Global Health Policy Simulation model (Health-GPS)
hgps::LifeTable Class Reference

Defines the population life table data type. More...

#include <life_table.h>

Public Member Functions

 LifeTable ()=delete
 
 LifeTable (std::map< int, Birth > &&births, std::map< int, std::map< int, Mortality >> &&deaths)
 Initialises a new instance of the LifeTable structure. More...
 
const Birthget_births_at (int time_year) const
 Gets the Birth indicators at a given time. More...
 
const std::map< int, Mortality > & get_mortalities_at (int time_year) const
 Gets the Mortality indicators at a given time. More...
 
double get_total_deaths_at (int time_year) const
 Gets the total number of deaths at a given time. More...
 
bool contains_age (int age) const noexcept
 Determine whether the LifeTable data contains a given age. More...
 
bool contains_time (int time_year) const noexcept
 Determine whether the LifeTable data contains a given time. More...
 
const core::IntegerIntervaltime_limits () const noexcept
 Gets the LifeTable data time limits. More...
 
const core::IntegerIntervalage_limits () const noexcept
 Gets the LifeTable data age limits. More...
 
bool empty () const noexcept
 Determine whether the LifeTable data is empty. More...
 

Detailed Description

Defines the population life table data type.

Constructor & Destructor Documentation

◆ LifeTable() [1/2]

hgps::LifeTable::LifeTable ( )
delete

◆ LifeTable() [2/2]

hgps::LifeTable::LifeTable ( std::map< int, Birth > &&  births,
std::map< int, std::map< int, Mortality >> &&  deaths 
)

Initialises a new instance of the LifeTable structure.

Parameters
birthsNumber of births per year
deathsNumber of deaths per year and age

Member Function Documentation

◆ age_limits()

const core::IntegerInterval & hgps::LifeTable::age_limits ( ) const
noexcept

Gets the LifeTable data age limits.

Returns
Data age limits
Here is the caller graph for this function:

◆ contains_age()

bool hgps::LifeTable::contains_age ( int  age) const
noexcept

Determine whether the LifeTable data contains a given age.

Parameters
ageThe age to check
Returns
true, if the LifeTable data contains the age; otherwise, false.

◆ contains_time()

bool hgps::LifeTable::contains_time ( int  time_year) const
noexcept

Determine whether the LifeTable data contains a given time.

Parameters
time_yearThe time to check
Returns
true, if the LifeTable data contains the time; otherwise, false.

◆ empty()

bool hgps::LifeTable::empty ( ) const
noexcept

Determine whether the LifeTable data is empty.

Returns
true, if the LifeTable data is empty; otherwise, false.
Here is the caller graph for this function:

◆ get_births_at()

const Birth & hgps::LifeTable::get_births_at ( int  time_year) const

Gets the Birth indicators at a given time.

Parameters
time_yearTime of births
Returns
The Birth indicator

◆ get_mortalities_at()

const std::map< int, Mortality > & hgps::LifeTable::get_mortalities_at ( int  time_year) const

Gets the Mortality indicators at a given time.

Parameters
time_yearTime of mortality
Returns
The age associate Mortality indicators
Here is the caller graph for this function:

◆ get_total_deaths_at()

double hgps::LifeTable::get_total_deaths_at ( int  time_year) const

Gets the total number of deaths at a given time.

Parameters
time_yearTime of deaths
Returns
Total number of deaths
Here is the call graph for this function:

◆ time_limits()

const core::IntegerInterval & hgps::LifeTable::time_limits ( ) const
noexcept

Gets the LifeTable data time limits.

Returns
Data time limits
Here is the caller graph for this function:

The documentation for this class was generated from the following files: