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.PTSP/3.3/AnalyticalPTSP.cs

    r17335 r17382  
    2525using HeuristicLab.Core;
    2626using HeuristicLab.Encodings.PermutationEncoding;
     27using HeuristicLab.Optimization;
    2728
    2829namespace HeuristicLab.Problems.PTSP {
     
    6061    }
    6162
    62     public override double Evaluate(Permutation tour, IRandom random, CancellationToken cancellationToken) {
    63       return Evaluate(tour, ProbabilisticTSPData, cancellationToken);
     63    public override ISingleObjectiveEvaluationResult Evaluate(Permutation tour, IRandom random, CancellationToken cancellationToken) {
     64      var quality = Evaluate(tour, ProbabilisticTSPData, cancellationToken);
     65      return new SingleObjectiveEvaluationResult(quality);
    6466    }
    6567
Note: See TracChangeset for help on using the changeset viewer.