StateAgeFunctionWrapper< FP > Struct Template Reference
|
CPP API
|
Wrapper around StateAgeFunction so that one can work with an arbitrary StateAgeFunction. More...
#include <state_age_function.h>
Public Member Functions | |
| FP | eval (FP state_age) const |
| Accesses eval of m_function. More... | |
| FP | get_distribution_parameter () const |
| Get the m_distribution_parameter object of m_function. More... | |
| FP | get_location () const |
| Get the m_location object of m_function. More... | |
| FP | get_mean (FP dt=1.0, FP tol=1e-10) const |
| Get the m_mean object of m_function. More... | |
| FP | get_scale () const |
| Get the m_scale object of m_function. More... | |
| std::string | get_state_age_function_type () const |
| Get type of StateAgeFunction, i.e. More... | |
| FP | get_support_max (FP dt, FP tol=1e-10) const |
| Get the m_support_max object of m_function. More... | |
| StateAgeFunctionWrapper< FP > & | operator= (StateAgeFunctionWrapper< FP > &&other)=default |
| Move assignment. More... | |
| StateAgeFunctionWrapper< FP > & | operator= (StateAgeFunctionWrapper< FP > const &other) |
| Copy assignment. More... | |
| bool | operator== (const StateAgeFunctionWrapper< FP > &other) const |
| Comparison operator. More... | |
| void | set_distribution_parameter (FP new_distribution_parameter) |
| Set the m_distribution_parameter object of m_function. More... | |
| void | set_location (FP new_location) |
| Set the m_location object of m_function. More... | |
| void | set_scale (FP new_scale) |
| Set the m_scale object of m_function. More... | |
| void | set_state_age_function (StateAgeFunction< FP > &new_function) |
| Set the StateAgeFunction object. More... | |
| StateAgeFunctionWrapper () | |
| StateAgeFunctionWrapper (StateAgeFunction< FP > &init_function) | |
| Constructs a new StateAgeFunctionWrapper object. More... | |
| StateAgeFunctionWrapper (StateAgeFunctionWrapper< FP > &&other)=default | |
| Move constructor. More... | |
| StateAgeFunctionWrapper (StateAgeFunctionWrapper< FP > const &other) | |
| Copy constructor. More... | |
| ~StateAgeFunctionWrapper ()=default | |
| Destructor. More... | |
Private Attributes | |
| std::unique_ptr< StateAgeFunction< FP > > | m_function |
| Stores StateAgeFunction that is used in Wrapper. More... | |
Detailed Description
template<typename FP>
struct mio::StateAgeFunctionWrapper< FP >
Wrapper around StateAgeFunction so that one can work with an arbitrary StateAgeFunction.
This way we can define e.g. the parameter TransmissionProbabilityOnContact as type StateAgeFunctionWrapper and set it with a specific StateAgeFunction for each example.
Example from IDE-SECIR model:
ExponentialSurvivalFunction exponential(1.0); StateAgeFunctionWrapper prob(exponential); model.parameters.set<mio::isecir::TransmissionProbabilityOnContact>(prob);
Constructor & Destructor Documentation
◆ StateAgeFunctionWrapper() [1/4]
|
inline |
◆ StateAgeFunctionWrapper() [2/4]
|
inline |
Constructs a new StateAgeFunctionWrapper object.
- Parameters
-
[in] init_function specifies the initial function.
◆ StateAgeFunctionWrapper() [3/4]
|
inline |
Copy constructor.
◆ StateAgeFunctionWrapper() [4/4]
|
default |
Move constructor.
◆ ~StateAgeFunctionWrapper()
|
default |
Destructor.
Member Function Documentation
◆ eval()
|
inline |
Accesses eval of m_function.
- Parameters
-
[in] state_age Time at which the function is evaluated.
- Returns
- Evaluation of the function at state_age.
◆ get_distribution_parameter()
|
inline |
Get the m_distribution_parameter object of m_function.
- Returns
- ScalarType
◆ get_location()
|
inline |
Get the m_location object of m_function.
- Returns
- ScalarType
◆ get_mean()
|
inline |
Get the m_mean object of m_function.
- Parameters
-
[in] dt Time step size used for the numerical integration. [in] tol The maximum support used for numerical integration is calculated using this tolerance.
- Returns
- ScalarType m_mean
◆ get_scale()
|
inline |
Get the m_scale object of m_function.
- Returns
- ScalarType
◆ get_state_age_function_type()
|
inline |
◆ get_support_max()
|
inline |
Get the m_support_max object of m_function.
- Parameters
-
[in] dt Time step size at which function will be evaluated. [in] tol Tolerance used for cutting the support if the function value falls below.
- Returns
- ScalarType m_support_max
◆ operator=() [1/2]
|
default |
Move assignment.
◆ operator=() [2/2]
|
inline |
Copy assignment.
◆ operator==()
|
inline |
Comparison operator.
◆ set_distribution_parameter()
|
inline |
Set the m_distribution_parameter object of m_function.
- Parameters
-
[in] new_distribution_parameter New parameter for StateAgeFunction.
◆ set_location()
|
inline |
Set the m_location object of m_function.
- Parameters
-
[in] new_location New location for StateAgeFunction.
◆ set_scale()
|
inline |
Set the m_scale object of m_function.
- Parameters
-
[in] new_scale New scale for StateAgeFunction.
◆ set_state_age_function()
|
inline |
Set the StateAgeFunction object.
- Parameters
-
[in] new_function function that we want to set member m_function to.
Member Data Documentation
◆ m_function
|
private |
Stores StateAgeFunction that is used in Wrapper.
Generated by