- Timestamp:
- 05/13/19 22:56:49 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2521_ProblemRefactoring/HeuristicLab.Encodings.RealVectorEncoding/3.3/RealVectorProblem.cs
r16949 r16950 63 63 } 64 64 65 public override void Analyze(RealVector[] 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(RealVector[] 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", (IItem)best. Clone());69 results.AddOrUpdateResult("Best Solution", (IItem)best.Item1.Clone()); 71 70 } 72 71
Note: See TracChangeset
for help on using the changeset viewer.