 |
Grail (C++)
1.1.1
A multi-platform, modular, universal engine for embedding advanced AI in games.
|
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 virtual EvaluatorType GetEvaluatorType() const override final {
return EvaluatorType::CURVE_CONSTANT; }
41 float constant = 0.0f;
45 #endif // GRAIL_CONSTANT_FUNCTION_H
virtual float Sample(float) const override final
Sample - Transforms argument into output value depending on the type of Curve.
Definition: ConstantFunction.hh:28
The Curve class - Defines objects transforming one value into the other.
Definition: Curve.hh:19
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 Evaluator class - base class being able to evaluate given context and output the result.
Definition: Evaluator.hh:20
The ConstantFunction class - Constant function.
Definition: ConstantFunction.hh:15