 |
Grail (C++)
1.1.1
A multi-platform, modular, universal engine for embedding advanced AI in games.
|
1 #ifndef GRAIL_EXPONENTIAL_FUNCTION_H
2 #define GRAIL_EXPONENTIAL_FUNCTION_H
11 template <
typename ContextType>
25 :
Curve<ContextType>{childEvaluator}, base{base}
29 virtual float Sample(
float argument)
const override final
31 return std::pow(base, argument);
39 virtual EvaluatorType GetEvaluatorType() const override final {
return EvaluatorType::CURVE_EXPONENTIAL; }
47 #endif // GRAIL_EXPONENTIAL_FUNCTION_H
The Curve class - Defines objects transforming one value into the other.
Definition: Curve.hh:19
The ExponentialFunction class - Exponential function.
Definition: ExponentialFunction.hh:16
virtual float Sample(float argument) const override final
Sample - Transforms argument into output value depending on the type of Curve.
Definition: ExponentialFunction.hh:29
ExponentialFunction(std::shared_ptr< utility::Evaluator< ContextType >> childEvaluator, float base)
ExponentialFunction - Construct.
Definition: ExponentialFunction.hh:24
float GetBase() const
GetBase.
Definition: ExponentialFunction.hh:38
The Evaluator class - base class being able to evaluate given context and output the result.
Definition: Evaluator.hh:20