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