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

LMS (lambda-mu-sigma) model definition data type. More...

#include <lms_definition.h>

Public Member Functions

 LmsDefinition ()=default
 Initialises a new instance of the LmsDefinition class. More...
 
 LmsDefinition (LmsDataset &&dataset)
 Initialises a new instance of the LmsDefinition class. More...
 
bool empty () const noexcept
 Determine whether the MLS definition is empty. More...
 
std::size_t size () const noexcept
 Gets the size of the MLS definition dataset. More...
 
unsigned int min_age () const noexcept
 Gets the definition minimum age. More...
 
unsigned int max_age () const noexcept
 Gets the definition maximum age. More...
 
bool contains (unsigned int age, core::Gender gender) const noexcept
 Determine whether the definition contains a given age by gender. More...
 
const LmsRecordat (unsigned int age, core::Gender gender) const
 Gets the model parameters for a given age and gender. More...
 

Detailed Description

LMS (lambda-mu-sigma) model definition data type.

Constructor & Destructor Documentation

◆ LmsDefinition() [1/2]

hgps::LmsDefinition::LmsDefinition ( )
default

Initialises a new instance of the LmsDefinition class.

◆ LmsDefinition() [2/2]

hgps::LmsDefinition::LmsDefinition ( LmsDataset &&  dataset)
inline

Initialises a new instance of the LmsDefinition class.

Parameters
datasetThe dataset instance to initialise
Exceptions
std::invalid_argumentfor empty LMS dataset definition.

Member Function Documentation

◆ at()

const LmsRecord& hgps::LmsDefinition::at ( unsigned int  age,
core::Gender  gender 
) const
inline

Gets the model parameters for a given age and gender.

Parameters
ageThe age reference
genderThe gender reference
Returns
The model parameters
Exceptions
std::out_of_rangeif the definition does not contains the specified age or gender

◆ contains()

bool hgps::LmsDefinition::contains ( unsigned int  age,
core::Gender  gender 
) const
inlinenoexcept

Determine whether the definition contains a given age by gender.

Parameters
ageThe age reference
genderThe gender reference
Returns
true if the definition contains the age; otherwise, false

◆ empty()

bool hgps::LmsDefinition::empty ( ) const
inlinenoexcept

Determine whether the MLS definition is empty.

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

◆ max_age()

unsigned int hgps::LmsDefinition::max_age ( ) const
inlinenoexcept

Gets the definition maximum age.

Returns
Maximum age value

◆ min_age()

unsigned int hgps::LmsDefinition::min_age ( ) const
inlinenoexcept

Gets the definition minimum age.

Returns
Minimum age value

◆ size()

std::size_t hgps::LmsDefinition::size ( ) const
inlinenoexcept

Gets the size of the MLS definition dataset.

Returns
The size of the definition dataset

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