Changeset 7615 for branches/HeuristicLab.TimeSeries/HeuristicLab.Algorithms.GeneticAlgorithm/3.3/GeneticAlgorithm.cs
- Timestamp:
- 03/15/12 09:11:17 (13 years ago)
- Location:
- branches/HeuristicLab.TimeSeries
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.TimeSeries
-
branches/HeuristicLab.TimeSeries/HeuristicLab.Algorithms.GeneticAlgorithm/3.3/GeneticAlgorithm.cs
r7268 r7615 353 353 ICrossover oldCrossover = CrossoverParameter.Value; 354 354 CrossoverParameter.ValidValues.Clear(); 355 ICrossover defaultCrossover = Problem.Operators.OfType<ICrossover>().FirstOrDefault(); 356 355 357 foreach (ICrossover crossover in Problem.Operators.OfType<ICrossover>().OrderBy(x => x.Name)) 356 358 CrossoverParameter.ValidValues.Add(crossover); 359 357 360 if (oldCrossover != null) { 358 361 ICrossover crossover = CrossoverParameter.ValidValues.FirstOrDefault(x => x.GetType() == oldCrossover.GetType()); 359 362 if (crossover != null) CrossoverParameter.Value = crossover; 360 } 363 else oldCrossover = null; 364 } 365 if (oldCrossover == null && defaultCrossover != null) 366 CrossoverParameter.Value = defaultCrossover; 361 367 } 362 368 private void UpdateMutators() {
Note: See TracChangeset
for help on using the changeset viewer.