Changeset 5204 for trunk/sources/HeuristicLab.Problems.TestFunctions
- Timestamp:
- 01/03/11 23:21:30 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.TestFunctions/3.3/Analyzers/BestSingleObjectiveTestFunctionSolutionAnalyzer.cs
r4722 r5204 109 109 SingleObjectiveTestFunctionSolution solution = BestSolutionParameter.ActualValue; 110 110 111 int i = qualities.Select((x, index) => new { index, x.Value }).OrderBy(x => x.Value).First().index; 111 int i = -1; 112 if (!max) i = qualities.Select((x, index) => new { index, x.Value }).OrderBy(x => x.Value).First().index; 113 else i = qualities.Select((x, index) => new { index, x.Value }).OrderByDescending(x => x.Value).First().index; 112 114 113 115 if (bestKnownQuality == null || … … 123 125 ResultCollection results = ResultsParameter.ActualValue; 124 126 solution = new SingleObjectiveTestFunctionSolution(realVectors[i], qualities[i], EvaluatorParameter.ActualValue); 125 solution.Population = realVectors ;127 solution.Population = realVectors[i].Length == 2 ? realVectors : null; 126 128 solution.BestKnownRealVector = BestKnownSolutionParameter.ActualValue; 127 129 solution.Bounds = BoundsParameter.ActualValue; … … 134 136 solution.BestQuality = qualities[i]; 135 137 } 136 solution.Population = realVectors ;138 solution.Population = realVectors[i].Length == 2 ? realVectors : null; 137 139 } 138 140
Note: See TracChangeset
for help on using the changeset viewer.