Ignore:
Timestamp:
07/01/14 10:53:46 (5 years ago)
Author:
mkommend
Message:

#2206: Updated data preprocessing branch with trunk changes.

Location:
branches/DataPreprocessing
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/DataPreprocessing

  • branches/DataPreprocessing/HeuristicLab.Problems.ParameterOptimization/3.3/BestSolutionAnalyzer.cs

    r10937 r11064  
    108108      }
    109109
    110       if (max && bestQuality > BestQualityParameter.ActualValue.Value
    111           || !max && bestQuality < BestQualityParameter.ActualValue.Value) {
    112         BestQualityParameter.ActualValue.Value = bestQuality;
    113         if (results.ContainsKey(BestSolutionResultName)) {
    114           var bestSolution = (DoubleArray)results[BestSolutionResultName].Value;
    115           bestSolution.ElementNames = ParameterNamesParameter.ActualValue;
    116           for (int i = 0; i < bestParameterVector.Length; i++)
    117             bestSolution[i] = bestParameterVector[i];
    118         }
    119       } else if (!results.ContainsKey(BestSolutionResultName)) {
     110      if (!results.ContainsKey(BestSolutionResultName)) {
    120111        results.Add(new Result(BestSolutionResultName, new DoubleArray(bestParameterVector.ToArray())));
    121112        var bestSolution = (DoubleArray)results[BestSolutionResultName].Value;
    122113        bestSolution.ElementNames = ParameterNamesParameter.ActualValue;
     114        BestQualityParameter.ActualValue.Value = bestQuality;
     115      } else if (max && bestQuality > BestQualityParameter.ActualValue.Value
     116                || !max && bestQuality < BestQualityParameter.ActualValue.Value) {
     117        var bestSolution = (DoubleArray)results[BestSolutionResultName].Value;
     118        bestSolution.ElementNames = ParameterNamesParameter.ActualValue;
     119        for (int i = 0; i < bestParameterVector.Length; i++)
     120          bestSolution[i] = bestParameterVector[i];
     121        BestQualityParameter.ActualValue.Value = bestQuality;
    123122      }
     123
    124124      //update best known quality
    125125      if (bestKnownQuality == null || max && bestQuality > bestKnownQuality.Value
Note: See TracChangeset for help on using the changeset viewer.