Defines the policy impact on risk factors data structure.
More...
#include <intervention_scenario.h>
Defines the policy impact on risk factors data structure.
◆ PolicyImpact() [1/2]
hgps::PolicyImpact::PolicyImpact |
( |
| ) |
|
|
delete |
◆ PolicyImpact() [2/2]
hgps::PolicyImpact::PolicyImpact |
( |
core::Identifier |
risk_factor_key, |
|
|
double |
policy_impact, |
|
|
unsigned int |
start_age, |
|
|
std::optional< unsigned int > |
end_age = std::nullopt |
|
) |
| |
|
inline |
Initialise a new instance of the PolicyImpact structure.
- Parameters
-
risk_factor_key | Risk factor identifier |
policy_impact | The impact on risk factor value |
start_age | Impact start age, inclusive |
end_age | Impact end age, inclusive |
- Exceptions
-
std::out_of_range | for impact end age less than the start age. |
◆ contains()
bool hgps::PolicyImpact::contains |
( |
const unsigned int & |
age | ) |
const |
|
inlinenoexcept |
Determine whether this impact should be applied to a given age.
- Parameters
-
- Returns
- true, if the age is in the impact valid range; otherwise, false.
◆ from_age
unsigned int hgps::PolicyImpact::from_age {} |
◆ risk_factor
The risk factor identifier.
◆ to_age
std::optional<unsigned int> hgps::PolicyImpact::to_age {} |
Impact applies to age, if no value, no upper limit.
◆ value
double hgps::PolicyImpact::value {} |
The documentation for this struct was generated from the following file: