The PowerFunction class - Power function.
More...
#include <PowerFunction.hh>
|
| PowerFunction (std::shared_ptr< Evaluator< ContextType >> childEvaluator, float slope, float intercept, float exponent) |
| PowerFunction - Constructor. More...
|
|
| PowerFunction (std::shared_ptr< Evaluator< ContextType >> childEvaluator, std::pair< float, float > firstPoint, std::pair< float, float > secondPoint, float exponent) |
| PowerFunction - Constructor. More...
|
|
virtual float | Sample (float argument) const override final |
| Sample - Transforms argument into output value depending on the type of Curve. More...
|
|
float | GetSlope () const |
| GetSlope. More...
|
|
float | GetIntercept () const |
| GetIntercept. More...
|
|
float | GetExponent () const |
| GetExponent. More...
|
|
virtual data::EvaluatorType | GetEvaluatorType () const override final |
|
| Curve (std::shared_ptr< Evaluator< ContextType >> childEvaluator) |
| Curve - Constructor. More...
|
|
| Curve (const Curve< ContextType > &other)=default |
|
| Curve (Curve< ContextType > &&other)=default |
|
virtual float | Evaluate (const ContextType &context, data::UtilityEvaluatorSnapshot *const snapshot) const override final |
| Evaluate - Called from EvaluateContext which also evaluates context, but without automatically filling snapshot with debug data. Should be overriden for each derived Evaluator. More...
|
|
virtual void | GetDependentConsiderations (std::vector< Consideration< ContextType > * > &considerations) override |
|
float | EvaluateContext (const ContextType &context, data::UtilityEvaluatorSnapshot *const snapshot) const |
| EvaluateContext - evaluates provided context and if provided snapshot is not empty, fills it with debug data describing this node. More...
|
|
|
virtual void | DebugDump (const std::map< const void *, unsigned int > &nodeMapping, data::EvaluationDebugData &debugData) const override final |
| DebugDump - Called from EvaluateContext, which generates additional debug data for each evaluator. Should be overriden in each derived evaluator to better reflect debug tree topology. More...
|
|
template<typename ContextType>
class grail::evaluator::PowerFunction< ContextType >
The PowerFunction class - Power function.
- Template Parameters
-
ContextType | - Type of evaluated object. By default - ValueTuple(AIEntity, Blackboard). |
◆ PowerFunction() [1/2]
template<typename ContextType >
PowerFunction - Constructor.
- Parameters
-
childEvaluator | - Evaluator which output will be transformed by this curve. |
slope | - "a" parameter of linear function which will be raised to power. |
intercept | - "b" parameter of linear function which will be raised to power. |
exponent | - Value to which power linear function will be raised. |
◆ PowerFunction() [2/2]
template<typename ContextType >
PowerFunction - Constructor.
- Parameters
-
childEvaluator | - Evaluator which output will be transformed by this curve. |
firstPoint | - Beginning of the segment describing linear function, which will be raised to power. |
secondPoint | - End of the segment describing linear function, which will be raised to power. |
exponent | - Value to which power linear function will be raised. |
◆ GetExponent()
template<typename ContextType >
GetExponent.
- Returns
- Value to which power linear function will be raised.
◆ GetIntercept()
template<typename ContextType >
GetIntercept.
- Returns
- "b" parameter of linear function which will be raised to power.
◆ GetSlope()
template<typename ContextType >
GetSlope.
- Returns
- "a" parameter of linear function which will be raised to power.
◆ Sample()
template<typename ContextType >
|
inlinefinaloverridevirtual |
Sample - Transforms argument into output value depending on the type of Curve.
- Parameters
-
argument | - Value of a curve argument belonging to its domain. |
- Returns
- Transformed argument.
Implements grail::evaluator::Curve< ContextType >.
The documentation for this class was generated from the following file: