ParameterizedEvaluator6TParameter1, TParameter2, TParameter3, TParameter4, TParameter5, TParameter6, TResultGetCachingWrapper Method |
Namespace: AGI.Foundation.Infrastructure
This method is called by EvaluatorGroup to create a caching version of an evaluator that is shared between multiple computations.
To implement this method in your own evaluator, construct and return a caching version of the evaluator's base class. For example, if your evaluator implements IEvaluatorT directly, return an instance of CachingEvaluatorT. In many cases, such as when implementing a PointEvaluator this method does not need to be overridden because the default implementation returns an appropriate caching wrapper already. If you do not want the last value computed by your evaluator to ever be cached, or if your evaluator does its own caching internally, this method can return this.
public override IEvaluator GetCachingWrapper() { return new CachingEvaluator<double>(this); }