Free cookie consent management tool by TermsFeed Policy Generator

Changeset 8987 for trunk


Ignore:
Timestamp:
12/03/12 13:04:55 (12 years ago)
Author:
jkarder
Message:

#1331: fixed lookup of the method used to evaluate TestFunctions in the SingleObjectiveTestFunctionImprovementOperator

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Improvers/SingleObjectiveTestFunctionImprovementOperator.cs

    r8327 r8987  
    126126        throw new ArgumentException("Cannot improve solution because it has the wrong type.");
    127127
    128       MethodInfo evaluationMethod = Evaluator.GetType().GetMethod("Apply",
    129                                                                   BindingFlags.Public | BindingFlags.Static,
     128      MethodInfo evaluationMethod = Evaluator.GetType().GetMethod("EvaluateFunction",
     129                                                                  BindingFlags.Instance | BindingFlags.NonPublic,
    130130                                                                  null,
    131                                                                   new Type[] { typeof(RealVector) }, null);
     131                                                                  new[] { typeof(RealVector) },
     132                                                                  null);
    132133      Func<RealVector, double> functionEvaluator = x => (double)evaluationMethod.Invoke(Evaluator, new object[] { x });
    133134      double bestSolQuality = functionEvaluator(bestSol);
Note: See TracChangeset for help on using the changeset viewer.