- Timestamp:
- 07/22/10 00:44:01 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.Knapsack/3.3/Analyzers/BestKnapsackSolutionAnalyzer.cs
r3797 r4068 20 20 #endregion 21 21 22 using System;23 using System.Collections.Generic;24 22 using System.Linq; 25 using System.Text; 23 using HeuristicLab.Core; 24 using HeuristicLab.Data; 25 using HeuristicLab.Encodings.BinaryVectorEncoding; 26 using HeuristicLab.Operators; 26 27 using HeuristicLab.Optimization; 27 using HeuristicLab.Data;28 using HeuristicLab.Core;29 using HeuristicLab.Operators;30 using HeuristicLab.Encodings.BinaryVectorEncoding;31 28 using HeuristicLab.Parameters; 32 29 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; … … 93 90 94 91 int i = -1; 95 if (!max) 92 if (!max) 96 93 i = qualities.Select((x, index) => new { index, x.Value }).OrderBy(x => x.Value).First().index; 97 94 else i = qualities.Select((x, index) => new { index, x.Value }).OrderByDescending(x => x.Value).First().index; … … 110 107 BestSolutionParameter.ActualValue = solution; 111 108 results.Add(new Result("Best Knapsack Solution", solution)); 112 } 109 } else { 113 110 if (max && qualities[i].Value > solution.Quality.Value || 114 111 !max && qualities[i].Value < solution.Quality.Value) {
Note: See TracChangeset
for help on using the changeset viewer.