Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/29/20 15:18:44 (4 years ago)
Author:
abeham
Message:

#2521: remove scope-based contexts, add helper methods to ScopeUtil, adapt operators

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2521_ProblemRefactoring/HeuristicLab.Encodings.BinaryVectorEncoding/3.3/BinaryVectorProblem.cs

    r17570 r17577  
    7171
    7272    public override void Analyze(ISingleObjectiveSolutionContext<BinaryVector>[] solutionContexts, ResultCollection results, IRandom random) {
     73      base.Analyze(solutionContexts, results, random);
    7374      var best = GetBest(solutionContexts);
    7475      var currentBest = BestResultParameter.ActualValue;
    7576      if (currentBest == null || IsBetter(best.EvaluationResult.Quality, currentBest.EvaluationResult.Quality))
    76         BestResultParameter.ActualValue = (ISingleObjectiveSolutionContext<BinaryVector>)best.Clone();
     77        BestResultParameter.ActualValue = new SingleObjectiveSolutionContext<BinaryVector>(
     78          (BinaryVector)best.EncodedSolution.Clone(), (ISingleObjectiveEvaluationResult)best.EvaluationResult.Clone());
    7779    }
    7880
Note: See TracChangeset for help on using the changeset viewer.