Health-GPS 3.0.0.0
Global Health Policy Simulation model (Health-GPS)
Loading...
Searching...
No Matches
hgps::DiseaseMeasure Class Reference

Defines the disease measures collection data type. More...

#include <disease_table.h>

Public Member Functions

 DiseaseMeasure ()=default
 Initialises a new instance of the DiseaseMeasure class.
 DiseaseMeasure (std::map< int, double > measures)
 Initialises a new instance of the DiseaseMeasure class.
std::size_t size () const noexcept
 Gets the size of the measure collection.
double at (int measure_id) const
 Gets the measure value by identifier.
double operator[] (int measure_id) const
 Gets the measure value by identifier.

Detailed Description

Defines the disease measures collection data type.

Indirectly lookup by integer instead of the string keys.

Constructor & Destructor Documentation

◆ DiseaseMeasure() [1/2]

hgps::DiseaseMeasure::DiseaseMeasure ( )
default

Initialises a new instance of the DiseaseMeasure class.

Here is the call graph for this function:

◆ DiseaseMeasure() [2/2]

hgps::DiseaseMeasure::DiseaseMeasure ( std::map< int, double > measures)

Initialises a new instance of the DiseaseMeasure class.

Parameters
measuresThe disease measures value mapping

Member Function Documentation

◆ at()

double hgps::DiseaseMeasure::at ( int measure_id) const

Gets the measure value by identifier.

Parameters
measure_idMeasure identifier
Returns
Measure value
Exceptions
std::out_of_rangefor unknown measure identifier
Here is the caller graph for this function:

◆ operator[]()

double hgps::DiseaseMeasure::operator[] ( int measure_id) const

Gets the measure value by identifier.

Parameters
measure_idMeasure identifier
Returns
Measure value
Exceptions
std::out_of_rangefor unknown measure identifier
Here is the call graph for this function:

◆ size()

std::size_t hgps::DiseaseMeasure::size ( ) const
noexcept

Gets the size of the measure collection.

Returns

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