1 #ifndef GRAIL_CONSTANT_FUNCTION_H
2 #define GRAIL_CONSTANT_FUNCTION_H
10 template <
typename ContextType>
24 :
Curve<ContextType>{childEvaluator}, constant{constant}
28 virtual float Sample(
float)
const override final
38 EvaluatorType GetEvaluatorType() const override final {
return EvaluatorType::CURVE_CONSTANT; }
41 float constant = 0.0f;
The ConstantFunction class - Constant function.
Definition: ConstantFunction.hh:16
virtual float Sample(float) const override final
Sample - Transforms argument into output value depending on the type of Curve.
Definition: ConstantFunction.hh:28
ConstantFunction(std::shared_ptr< utility::Evaluator< ContextType >> childEvaluator, float constant)
ConstantFunction - Constructor.
Definition: ConstantFunction.hh:23
float GetConstant() const
GetConstant.
Definition: ConstantFunction.hh:37
The Curve class - Defines objects transforming one value into the other.
Definition: Curve.hh:21
The Evaluator class - base class being able to evaluate given context and output the result.
Definition: Evaluator.hh:21