Changeset 7807 for branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Analyzers/BestGQAPSolutionAnalyzer.cs
- Timestamp:
- 05/14/12 15:59:39 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/GeneralizedQAP/HeuristicLab.Problems.GeneralizedQuadraticAssignment/3.3/Analyzers/BestGQAPSolutionAnalyzer.cs
r7470 r7807 157 157 int bestIndex; 158 158 var tmp = qualities.Select((x, index) => new { Index = index, Value = x.Value }); 159 if (maximization) bestIndex = tmp. ChooseMax(x => x.Value).Index;160 else bestIndex = tmp. ChooseMin(x => x.Value).Index;159 if (maximization) bestIndex = tmp.MaxItems(x => x.Value).First().Index; 160 else bestIndex = tmp.MinItems(x => x.Value).First().Index; 161 161 162 162 if (bestKnownQuality == null || HasSolutionImproved(bestKnownQuality.Value, qualities[bestIndex].Value, maximization)) {
Note: See TracChangeset
for help on using the changeset viewer.