Changeset 15007 for trunk/sources
- Timestamp:
- 05/31/17 12:52:25 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Algorithms.GeneticAlgorithm/3.3/GeneticAlgorithm.cs
r15006 r15007 397 397 IManipulator oldMutator = MutatorParameter.Value; 398 398 MutatorParameter.ValidValues.Clear(); 399 IManipulator defaultMutator = Problem.Operators.OfType<IManipulator>().FirstOrDefault(); 400 399 401 foreach (IManipulator mutator in Problem.Operators.OfType<IManipulator>().OrderBy(x => x.Name)) 400 402 MutatorParameter.ValidValues.Add(mutator); 403 401 404 if (oldMutator != null) { 402 405 IManipulator mutator = MutatorParameter.ValidValues.FirstOrDefault(x => x.GetType() == oldMutator.GetType()); 403 406 if (mutator != null) MutatorParameter.Value = mutator; 404 } 407 else oldMutator = null; 408 } 409 410 if (oldMutator != null && defaultMutator != null) 411 MutatorParameter.Value = defaultMutator; 405 412 } 406 413 private void UpdateAnalyzers() {
Note: See TracChangeset
for help on using the changeset viewer.