Grail (C#)  1.3.0
A multi-platform, modular, universal engine for embedding advanced AI in games.
Grail.Evaluators.Curves.Curve< ContextType > Class Template Referenceabstract

Defines objects transforming one value into the other. More...

Inheritance diagram for Grail.Evaluators.Curves.Curve< ContextType >:
Collaboration diagram for Grail.Evaluators.Curves.Curve< ContextType >:

Public Member Functions

 Curve (Evaluator< ContextType > childEvaluator)
 Constructor. More...
 
abstract float Sample (float argument)
 Transforms argument into output value depending on the type of Curve. More...
 
- Public Member Functions inherited from Grail.Evaluators.Evaluator< ContextType >
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...
 

Protected Member Functions

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...
 

Additional Inherited Members

- Properties inherited from Grail.Evaluators.Evaluator< ContextType >
abstract EvaluatorType EvaluatorType [get]
 

Detailed Description

Defines objects transforming one value into the other.

Template Parameters
ContextTypeType of evaluated object. By default - ValueTuple(AIEntity, Blackboard).

Constructor & Destructor Documentation

◆ Curve()

Grail.Evaluators.Curves.Curve< ContextType >.Curve ( Evaluator< ContextType >  childEvaluator)
inline

Constructor.

Parameters
childEvaluatorEvaluator which output will be transformed by this curve.

Member Function Documentation

◆ DebugDump()

sealed override void Grail.Evaluators.Curves.Curve< ContextType >.DebugDump ( IReadOnlyDictionary< object, int >  nodeMapping,
ref EvaluationDebugData  debugData 
)
inlineprotectedvirtual

Called from EvaluateContext, which generates additional debug data for each evaluator. Should be overriden in each derived evaluator to better reflect debug tree topology.

Parameters
nodeMappingMaps node pointers to node index.
debugDataEvaluation debug data which will be filled in this method.

Implements Grail.Evaluators.Evaluator< ContextType >.

◆ Evaluate()

sealed override float Grail.Evaluators.Curves.Curve< ContextType >.Evaluate ( ContextType  context,
in UtilityEvaluatorSnapshot  snapshot 
)
inlineprotectedvirtual

Called from EvaluateContext which also evaluates context, but without automatically filling snapshot with debug data. Should be overriden for each derived Evaluator.

Parameters
contextInput data for evaluation.
snapshotEvaluator snapshot containing debug data describing whole evaluator tree.
Returns
Numerical evaluation of provided context.

Implements Grail.Evaluators.Evaluator< ContextType >.

◆ Sample()


The documentation for this class was generated from the following file: