Health-GPS  1.2.2.0
Global Health Policy Simulation model (Health-GPS)
hgps::AgeGenderTable< TYPE > Class Template Reference

Defines the age and gender lookup table data type. More...

#include <gender_table.h>

Inheritance diagram for hgps::AgeGenderTable< TYPE >:
[legend]
Collaboration diagram for hgps::AgeGenderTable< TYPE >:
[legend]

Public Member Functions

 AgeGenderTable ()=default
 Initialises a new instance of the AgeGenderTable class. More...
 
 AgeGenderTable (const MonotonicVector< int > &rows, const std::vector< core::Gender > &cols, core::Array2D< TYPE > &&values)
 Initialises a new instance of the AgeGenderTable class. More...
 
- Public Member Functions inherited from hgps::GenderTable< int, TYPE >
 GenderTable ()=default
 Initialises a new instance of the GenderTable class. More...
 
 GenderTable (const MonotonicVector< ROW > &rows, const std::vector< core::Gender > &cols, core::Array2D< TYPE > &&values)
 Initialises a new instance of the GenderTable class. More...
 
std::size_t size () const noexcept
 Gets the lookup table size. More...
 
std::size_t rows () const noexcept
 Get the number of rows lookup breakpoints. More...
 
std::size_t columns () const noexcept
 Get the number of columns lookup breakpoints. More...
 
bool empty () const noexcept
 Determine whether the lookup table is empty. More...
 
TYPE & at (const ROW row, const core::Gender gender)
 Gets a value at a given row and column intersection. More...
 
const TYPE & at (const ROW row, const core::Gender gender) const
 Gets a read-only value at a given row and column intersection. More...
 
TYPE & operator() (const ROW row, const core::Gender gender)
 Gets a value at a given row and column intersection. More...
 
const TYPE & operator() (const ROW row, const core::Gender gender) const
 Gets a read-only value at a given row and column intersection. More...
 
bool contains (const ROW row) const noexcept
 Determines whether the lookup contains a row. More...
 
bool contains (const ROW row, const core::Gender gender) const noexcept
 Determines whether the lookup contains a value. More...
 

Detailed Description

template<core::Numerical TYPE>
class hgps::AgeGenderTable< TYPE >

Defines the age and gender lookup table data type.

Template Parameters
TYPEThe cell value type

Constructor & Destructor Documentation

◆ AgeGenderTable() [1/2]

template<core::Numerical TYPE>
hgps::AgeGenderTable< TYPE >::AgeGenderTable ( )
default

Initialises a new instance of the AgeGenderTable class.

◆ AgeGenderTable() [2/2]

template<core::Numerical TYPE>
hgps::AgeGenderTable< TYPE >::AgeGenderTable ( const MonotonicVector< int > &  rows,
const std::vector< core::Gender > &  cols,
core::Array2D< TYPE > &&  values 
)
inline

Initialises a new instance of the AgeGenderTable class.

Parameters
rowsThe monotonic rows lookup breakpoints
colsThe gender columns lookup breakpoints
valuesThe full lookup-table values
Exceptions
std::invalid_argumentfor lookup breakpoints and values table size mismatch

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