Changeset 11576 for branches/OptimizationNetworks/HeuristicLab.Problems.ParameterOptimization/3.3/BestSolutionAnalyzer.cs
- Timestamp:
- 11/25/14 03:26:00 (10 years ago)
- Location:
- branches/OptimizationNetworks
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/OptimizationNetworks
- Property svn:mergeinfo changed
-
branches/OptimizationNetworks/HeuristicLab.Problems.ParameterOptimization/3.3/BestSolutionAnalyzer.cs
r11019 r11576 95 95 DoubleValue bestKnownQuality = BestKnownQualityParameter.ActualValue; 96 96 97 int ind = -1;98 if (!max) ind = qualities.Select((x, index) => new { index, x.Value }).OrderBy(x => x.Value).First().index;99 else ind = qualities.Select((x, index) => new { index, x.Value }).OrderByDescending(x => x.Value).First().index;97 int indexOfBest = -1; 98 if (!max) indexOfBest = qualities.Select((x, index) => new { index, x.Value }).OrderBy(x => x.Value).First().index; 99 else indexOfBest = qualities.Select((x, index) => new { index, x.Value }).OrderByDescending(x => x.Value).First().index; 100 100 101 var bestQuality = qualities[ind ].Value;102 var bestParameterVector = (RealVector)parameterVectors[ind ].Clone();101 var bestQuality = qualities[indexOfBest].Value; 102 var bestParameterVector = (RealVector)parameterVectors[indexOfBest].Clone(); 103 103 ResultCollection results = ResultsParameter.ActualValue; 104 104 … … 123 123 124 124 //update best known quality 125 if (bestKnownQuality == null || max && bestQuality > bestKnownQuality.Value 125 if (bestKnownQuality == null 126 || max && bestQuality > bestKnownQuality.Value 126 127 || !max && bestQuality < bestKnownQuality.Value) { 127 128 BestKnownQualityParameter.ActualValue = new DoubleValue(bestQuality);
Note: See TracChangeset
for help on using the changeset viewer.