|
svZeroDSolver
|
Base class for activation functions. More...
#include <ActivationFunction.h>
Public Member Functions | |
| ActivationFunction (double cardiac_period, const std::vector< std::pair< std::string, InputParameter > > &input_param_properties) | |
| Construct activation function. | |
| virtual double | compute (double time)=0 |
| Compute activation value at given time. | |
| virtual ActivationSignalType | signal_type () const |
| Type of signal this activation function's compute() produces. | |
| Public Member Functions inherited from ParameterHolder | |
| ParameterHolder (const std::vector< std::pair< std::string, InputParameter > > &props) | |
| Construct a ParameterHolder. | |
| void | set_param (const std::string &name, double value) |
| Set a scalar parameter value by name. | |
| void | set_param_vector (const std::string &name, const std::vector< double > &value) |
| Set a vector-valued parameter value by name. | |
| virtual void | finalize () |
| Called once after all parameters have been read from the input file (e.g. by the loader). | |
Static Public Member Functions | |
| static std::unique_ptr< ActivationFunction > | create_default (const std::string &type_str, double cardiac_period) |
| Create a default activation function from activation function type. | |
Protected Attributes | |
| double | cardiac_period_ |
| Time duration of one cardiac cycle. | |
| Protected Attributes inherited from ParameterHolder | |
| std::map< std::string, double > | params_ |
| Map of scalar parameter names to their values. | |
| std::map< std::string, std::vector< double > > | params_vec_ |
| Map of vector-valued parameter names to their values. | |
Additional Inherited Members | |
| Public Attributes inherited from ParameterHolder | |
| const std::vector< std::pair< std::string, InputParameter > > | input_param_properties |
| Properties of the input parameters for this component [(name, InputParameter), ...]. | |
Base class for activation functions.
Activation functions compute the activation value (between 0 and 1) at a given time point within a cardiac cycle. These are used to modulate chamber elastance over time.
| ActivationFunction::ActivationFunction | ( | double | cardiac_period, |
| const std::vector< std::pair< std::string, InputParameter > > & | input_param_properties ) |
Construct activation function.
| cardiac_period | Cardiac cycle period |
| input_param_properties | Properties of the input parameters [(name, InputParameter), ...] for this activation function |
|
pure virtual |
Compute activation value at given time.
| time | Current time |
Implemented in DoubleTanhActivation, FourierActivation, HalfCosineActivation, PiecewiseCosineActivation, PiecewiseRateActivation, TwoHillActivation, and WrappingCosineActivation.
|
static |
Create a default activation function from activation function type.
| type_str | One of: "half_cosine", "piecewise_cosine", "two_hill", "double_tanh", "wrapping_cosine", "fourier", "piecewise_rate" |
| cardiac_period | Cardiac cycle period |
|
inlinevirtual |
Type of signal this activation function's compute() produces.
Reimplemented in PiecewiseRateActivation.
|
protected |
Time duration of one cardiac cycle.