Changeset 12005 for stable/HeuristicLab.Problems.Programmable/3.3/Templates
- Timestamp:
- 02/13/15 15:00:15 (10 years ago)
- Location:
- stable
- Files:
-
- 2 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
stable
- Property svn:mergeinfo changed
/trunk/sources merged: 11939,11945,11956,11958-11961,11963,11967,11970-11971,11982-11984,11987-11988,11990,11993-11994,11996,11998-12004
- Property svn:mergeinfo changed
-
stable/HeuristicLab.Problems.Programmable/3.3/Templates/CompiledSingleObjectiveProblemDefinition.cs
r11949 r12005 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.