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

PIF data table for a specific disease-risk factor-scenario combination. More...

#include <pif_data.h>

Public Member Functions

 PIFTable ()=default
 Default constructor.
 
double get_pif_value (int age, core::Gender gender, int year_post_intervention) const
 Get PIF value for specific age, gender, and time.
 
void add_item (const PIFDataItem &item)
 Add PIF data item.
 
void build_hash_table ()
 Build hash table from vector data for direct access Call this after adding all items to optimize lookup performance.
 
bool has_data () const noexcept
 Check if PIF data is available.
 
std::size_t size () const noexcept
 Get the number of data items.
 
void clear () noexcept
 Clear all data.
 

Detailed Description

PIF data table for a specific disease-risk factor-scenario combination.

Constructor & Destructor Documentation

◆ PIFTable()

hgps::input::PIFTable::PIFTable ( )
default

Default constructor.

Member Function Documentation

◆ add_item()

void hgps::input::PIFTable::add_item ( const PIFDataItem item)

Add PIF data item.

Parameters
itemPIF data item to add

◆ build_hash_table()

void hgps::input::PIFTable::build_hash_table ( )

Build hash table from vector data for direct access Call this after adding all items to optimize lookup performance.

◆ clear()

void hgps::input::PIFTable::clear ( )
inlinenoexcept

Clear all data.

◆ get_pif_value()

double hgps::input::PIFTable::get_pif_value ( int  age,
core::Gender  gender,
int  year_post_intervention 
) const

Get PIF value for specific age, gender, and time.

Parameters
agePerson's age
genderPerson's gender
year_post_interventionYears since intervention start
Returns
PIF value (0.0 to 1.0), returns 0.0 if not found

◆ has_data()

bool hgps::input::PIFTable::has_data ( ) const
inlinenoexcept

Check if PIF data is available.

Returns
true if data is available, false otherwise

◆ size()

std::size_t hgps::input::PIFTable::size ( ) const
inlinenoexcept

Get the number of data items.

Returns
Number of PIF data items

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