- Timestamp:
- 06/16/14 10:29:26 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.ParameterOptimization/3.3/BestSolutionAnalyzer.cs
r10937 r11019 108 108 } 109 109 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)) { 120 111 results.Add(new Result(BestSolutionResultName, new DoubleArray(bestParameterVector.ToArray()))); 121 112 var bestSolution = (DoubleArray)results[BestSolutionResultName].Value; 122 113 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; 123 122 } 123 124 124 //update best known quality 125 125 if (bestKnownQuality == null || max && bestQuality > bestKnownQuality.Value
Note: See TracChangeset
for help on using the changeset viewer.