- Timestamp:
- 07/08/14 20:04:46 (10 years ago)
- Location:
- stable
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
stable
- Property svn:mergeinfo changed
/trunk/sources merged: 10937,11019
- Property svn:mergeinfo changed
-
stable/HeuristicLab.Problems.ParameterOptimization/3.3/BestSolutionAnalyzer.cs
r11151 r11152 101 101 var bestQuality = qualities[indexOfBest].Value; 102 102 var bestParameterVector = (RealVector)parameterVectors[indexOfBest].Clone(); 103 ResultCollection results = ResultsParameter.ActualValue; 103 104 104 105 if (BestQualityParameter.ActualValue == null) { … … 107 108 } 108 109 109 if (max && bestQuality > BestQualityParameter.ActualValue.Value 110 || !max && bestQuality < BestQualityParameter.ActualValue.Value) { 110 if (!results.ContainsKey(BestSolutionResultName)) { 111 results.Add(new Result(BestSolutionResultName, new DoubleArray(bestParameterVector.ToArray()))); 112 var bestSolution = (DoubleArray)results[BestSolutionResultName].Value; 113 bestSolution.ElementNames = ParameterNamesParameter.ActualValue; 111 114 BestQualityParameter.ActualValue.Value = bestQuality; 112 ResultCollection results = ResultsParameter.ActualValue; 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 } else { 119 results.Add(new Result(BestSolutionResultName, new DoubleArray(bestParameterVector.ToArray()))); 120 var bestSolution = (DoubleArray)results[BestSolutionResultName].Value; 121 bestSolution.ElementNames = ParameterNamesParameter.ActualValue; 122 } 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 } 124 123
Note: See TracChangeset
for help on using the changeset viewer.