HouseholdMember Class Reference

CPP API: mio::abm::HouseholdMember Class Reference
mio::abm::HouseholdMember Class Reference

A HouseholdMember represented by a weighted age distribution. More...

#include <household.h>

Collaboration diagram for mio::abm::HouseholdMember:

Public Member Functions

const CustomIndexArray< int, mio::AgeGroup > & get_age_weights () const
 Returns the CustomIndexArray with the weights of each AgeGroup. More...
 
 HouseholdMember (size_t num_agegroups)
 Constructs a new HouseholdMember. More...
 
void set_age_weight (mio::AgeGroup age_group, int weight)
 Sets the weight of an AgeGroup. More...
 

Private Attributes

CustomIndexArray< int, mio::AgeGroupm_age_weights
 Weights of every AgeGroup. More...
 

Detailed Description

A HouseholdMember represented by a weighted age distribution.

For every AgeGroup there is a weight which is used to calculate the age of the Person living in this Household.

Constructor & Destructor Documentation

◆ HouseholdMember()

mio::abm::HouseholdMember::HouseholdMember ( size_t  num_agegroups)
inline

Constructs a new HouseholdMember.

Parameters
[in]agegroupsthe age groups in the model.

Member Function Documentation

◆ get_age_weights()

const CustomIndexArray<int, mio::AgeGroup>& mio::abm::HouseholdMember::get_age_weights ( ) const
inline

Returns the CustomIndexArray with the weights of each AgeGroup.

◆ set_age_weight()

void mio::abm::HouseholdMember::set_age_weight ( mio::AgeGroup  age_group,
int  weight 
)
inline

Sets the weight of an AgeGroup.

The weights correspond to the probability that a Person has the corresponding age.

Parameters
[in]age_groupThe AgeGroup.
[in]weightThe weight of the AgeGroup.

Member Data Documentation

◆ m_age_weights

CustomIndexArray<int, mio::AgeGroup> mio::abm::HouseholdMember::m_age_weights
private

Weights of every AgeGroup.