- Timestamp:
- 01/30/09 10:38:42 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.TestFunctions/TestFunctionEvaluatorBase.cs
r2 r1188 28 28 29 29 namespace HeuristicLab.TestFunctions { 30 /// <summary> 31 /// Base class for a test function evaluator. 32 /// </summary> 30 33 public abstract class TestFunctionEvaluatorBase : SingleObjectiveEvaluatorBase { 34 /// <summary> 35 /// Initializes a new instance of <see cref="TestFunctionEvaluatorBase"/> with one variable info 36 /// (<c>Point</c>). 37 /// </summary> 31 38 public TestFunctionEvaluatorBase() { 32 39 AddVariableInfo(new VariableInfo("Point", "n-dimensional point for which the test function should be evaluated", typeof(DoubleArrayData), VariableKind.In)); 33 40 } 34 41 42 /// <summary> 43 /// Evaluates the test function for a specific point. 44 /// </summary> 45 /// <remarks>Calls <see cref="EvaluateFunction(double[])"/>.</remarks> 46 /// <param name="scope">The current scope with the point for which to evaluate.</param> 47 /// <returns>The result value of the function at the given point.</returns> 35 48 protected sealed override double Evaluate(IScope scope) { 36 49 return EvaluateFunction(GetVariableValue<DoubleArrayData>("Point", scope, false).Data); 37 50 } 38 51 52 /// <summary> 53 /// Evaluates the test function for a specific <paramref name="point"/>. 54 /// </summary> 55 /// <param name="point">N-dimensional point for which the test function should be evaluated.</param> 56 /// <returns>The result value of the function at the given point.</returns> 39 57 protected abstract double EvaluateFunction(double[] point); 40 58 }
Note: See TracChangeset
for help on using the changeset viewer.