Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/18/19 16:11:21 (5 years ago)
Author:
mkommend
Message:

#2521: Refactored single-objective problems to use EvaluationResult instead of double as return type from Evaluate.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2521_ProblemRefactoring/HeuristicLab.Problems.GrammaticalEvolution/3.4/ArtificialAnt/GEArtificialAntProblem.cs

    r17320 r17382  
    9696
    9797    private readonly object syncRoot = new object();
    98     public override double Evaluate(IntegerVector solution, IRandom random, CancellationToken cancellationToken) {
     98    public override ISingleObjectiveEvaluationResult Evaluate(IntegerVector solution, IRandom random, CancellationToken cancellationToken) {
    9999      var bounds = Encoding.Bounds;
    100100      var len = Encoding.Length;
     
    113113      interpreter.Run();
    114114
    115       return interpreter.FoodEaten;
     115      var quality = interpreter.FoodEaten;
     116      return new SingleObjectiveEvaluationResult(quality);
    116117    }
    117118
Note: See TracChangeset for help on using the changeset viewer.