- Timestamp:
- 05/13/19 22:56:49 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2521_ProblemRefactoring/HeuristicLab.Encodings.PermutationEncoding/3.3/PermutationProblem.cs
r16948 r16950 68 68 } 69 69 70 public override void Analyze(Permutation[] individuals, double[] qualities, ResultCollection results, IRandom random) { 71 base.Analyze(individuals, qualities, results, random); 72 var orderedIndividuals = individuals.Zip(qualities, (i, q) => new { Individual = i, Quality = q }).OrderBy(z => z.Quality); 73 var best = Maximization ? orderedIndividuals.Last().Individual : orderedIndividuals.First().Individual; 74 75 results.AddOrUpdateResult("Best Solution", (IItem)best.Clone()); 70 public override void Analyze(Permutation[] permutations, double[] qualities, ResultCollection results, IRandom random) { 71 base.Analyze(permutations, qualities, results, random); 72 var best = GetBestSolution(permutations, qualities); 73 results.AddOrUpdateResult("Best Solution", (IItem)best.Item1.Clone()); 76 74 } 77 75
Note: See TracChangeset
for help on using the changeset viewer.