Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/29/14 09:06:36 (11 years ago)
Author:
abeham
Message:

#2180: merged to stable

Location:
stable
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • stable

  • stable/HeuristicLab.Problems.TestFunctions

  • stable/HeuristicLab.Problems.TestFunctions/3.3/Analyzers/BestSingleObjectiveTestFunctionSolutionAnalyzer.cs

    r9456 r10795  
    138138      if (solution == null) {
    139139        ResultCollection results = ResultsParameter.ActualValue;
    140         solution = new SingleObjectiveTestFunctionSolution(realVectors[i], qualities[i], EvaluatorParameter.ActualValue);
    141         solution.Population = realVectors[i].Length == 2 ? realVectors : null;
     140        solution = new SingleObjectiveTestFunctionSolution((RealVector)realVectors[i].Clone(),
     141                                                           (DoubleValue)qualities[i].Clone(),
     142                                                           EvaluatorParameter.ActualValue);
     143        solution.Population = realVectors[i].Length == 2
     144          ? new ItemArray<RealVector>(realVectors.Select(x => x.Clone()).Cast<RealVector>())
     145          : null;
    142146        solution.BestKnownRealVector = BestKnownSolutionParameter.ActualValue;
    143147        solution.Bounds = BoundsParameter.ActualValue;
     
    147151        if (max && qualities[i].Value > solution.BestQuality.Value
    148152          || !max && qualities[i].Value < solution.BestQuality.Value) {
    149           solution.BestRealVector = realVectors[i];
    150           solution.BestQuality = qualities[i];
     153          solution.BestRealVector = (RealVector)realVectors[i].Clone();
     154          solution.BestQuality = (DoubleValue)qualities[i].Clone();
    151155        }
    152         solution.Population = realVectors[i].Length == 2 ? realVectors : null;
     156        solution.Population = realVectors[i].Length == 2
     157          ? new ItemArray<RealVector>(realVectors.Select(x => x.Clone()).Cast<RealVector>())
     158          : null;
    153159      }
    154160
Note: See TracChangeset for help on using the changeset viewer.