Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/18/19 15:06:18 (4 years ago)
Author:
mkommend
Message:

#2521: Fixed single-objective evaluation results and scope contexts.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2521_ProblemRefactoring/HeuristicLab.Optimization/3.3/BasicProblems/SolutionContext.cs

    r17366 r17381  
    2323using System;
    2424using System.Collections.Generic;
    25 
     25using System.Linq;
    2626using HEAL.Attic;
    2727using HeuristicLab.Common;
     
    5858
    5959    public SolutionContext(SolutionContext<TEncodedSolution> original, Cloner cloner) : base(original, cloner) {
    60       //TODO clone data dictionary
    6160      EncodedSolution = cloner.Clone(original.EncodedSolution);
    6261      EvaluationResult = cloner.Clone(original.EvaluationResult);
     62
     63
     64      data = original.data.ToDictionary(entry => entry.Key,
     65                                        entry => entry.Value is DeepCloneable ? cloner.Clone((DeepCloneable)entry.Value) : entry.Value);
    6366    }
    6467
Note: See TracChangeset for help on using the changeset viewer.