Changeset 12001
- Timestamp:
- 02/13/15 12:57:28 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.Programmable/3.3/Templates/CompiledSingleObjectiveProblemDefinition.cs
r11949 r12001 44 44 // Write or update results given the range of vectors and resulting qualities 45 45 // Uncomment the following lines if you want to retrieve the best individual 46 //var bestIndex = Maximization ? 47 // qualities.Select((v, i) => Tuple.Create(i, v)).OrderByDescending(x => x.Item2).First().Item1 48 // : qualities.Select((v, i) => Tuple.Create(i, v)).OrderBy(x => x.Item2).First().Item1; 49 //var best = individuals[bestIndex]; 46 47 //var orderedIndividuals = individuals.Zip(qualities, (i, q) => new { Individual = i, Quality = q }).OrderBy(z => z.Quality); 48 //var best = Maximization ? orderedIndividuals.Last().Individual : orderedIndividuals.First().Individual; 49 50 //if (!results.ContainsKey("Best Solution")) { 51 // results.Add(new Result("Best Solution", typeof(RealVector))); 52 //} 53 //results["Best Solution"].Value = (IItem)best.RealVector("r").Clone(); 50 54 } 51 55
Note: See TracChangeset
for help on using the changeset viewer.