Power function.
More...
|
| PowerFunction (Evaluator< ContextType > childEvaluator, float slope, float intercept, float exponent) |
| Constructor. More...
|
|
| PowerFunction (Evaluator< ContextType > childEvaluator, KeyValuePair< float, float > firstPoint, KeyValuePair< float, float > secondPoint, float initExponent) |
| Constructor. More...
|
|
sealed override float | Sample (float argument) |
| Transforms argument into output value depending on the type of Curve. More...
|
|
| Curve (Evaluator< ContextType > childEvaluator) |
| Constructor. More...
|
|
override void | GetDependentConsiderations (List< Consideration< ContextType >> considerations) |
|
float | EvaluateContext (ContextType context, in UtilityEvaluatorSnapshot snapshot) |
| Evaluates provided context and if provided snapshot is not empty, fills it with debug data describing this node. More...
|
|
|
sealed override EvaluatorType | EvaluatorType => EvaluatorType.CURVE_POWER |
|
|
static void | CacheConsiderationEvaluations (Evaluator< ContextType > evaluator, ContextType context) |
|
sealed override float | Evaluate (ContextType context, in UtilityEvaluatorSnapshot snapshot) |
| Called from EvaluateContext which also evaluates context, but without automatically filling snapshot with debug data. Should be overriden for each derived Evaluator. More...
|
|
sealed override void | DebugDump (IReadOnlyDictionary< object, int > nodeMapping, ref EvaluationDebugData debugData) |
| 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...
|
|
abstract EvaluatorType | EvaluatorType [get] |
|
Power function.
- Template Parameters
-
ContextType | Type of evaluated object. By default - ValueTuple(AIEntity, Blackboard). |
◆ PowerFunction() [1/2]
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]
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. |
initExponent | Value to which power linear function will be raised. |
- Exceptions
-
ArgumentException | Thrown when firstPoint and secondPoint describe impossible segment. |
◆ Sample()
The documentation for this class was generated from the following file:
- GrailEvaluators/source/Curves/PowerFunction.cs