Changeset 10937 for trunk/sources
- Timestamp:
- 06/04/14 12:59:15 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.ParameterOptimization/3.3/BestSolutionAnalyzer.cs
r10594 r10937 101 101 var bestQuality = qualities[ind].Value; 102 102 var bestParameterVector = (RealVector)parameterVectors[ind].Clone(); 103 ResultCollection results = ResultsParameter.ActualValue; 103 104 104 105 if (BestQualityParameter.ActualValue == null) { … … 110 111 || !max && bestQuality < BestQualityParameter.ActualValue.Value) { 111 112 BestQualityParameter.ActualValue.Value = bestQuality; 112 ResultCollection results = ResultsParameter.ActualValue;113 113 if (results.ContainsKey(BestSolutionResultName)) { 114 114 var bestSolution = (DoubleArray)results[BestSolutionResultName].Value; … … 116 116 for (int i = 0; i < bestParameterVector.Length; i++) 117 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 118 } 119 } else if (!results.ContainsKey(BestSolutionResultName)) { 120 results.Add(new Result(BestSolutionResultName, new DoubleArray(bestParameterVector.ToArray()))); 121 var bestSolution = (DoubleArray)results[BestSolutionResultName].Value; 122 bestSolution.ElementNames = ParameterNamesParameter.ActualValue; 123 123 } 124 125 124 //update best known quality 126 125 if (bestKnownQuality == null || max && bestQuality > bestKnownQuality.Value
Note: See TracChangeset
for help on using the changeset viewer.