Changeset 11885 for branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/New/BasicProblem.cs
- Timestamp:
- 02/04/15 13:28:37 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ProgrammableProblem/HeuristicLab.Problems.Programmable/3.3/New/BasicProblem.cs
r11880 r11885 126 126 foreach (var multi in nestedEncodings) 127 127 AdaptEncodingOperators(multi.oldEnc, multi.newEnc); 128 129 foreach (var op in oldMultiEncoding.Operators.OfType<IMultiEncodingOperator>())130 foreach (var multi in nestedEncodings)131 op.ReplaceEncoding(multi.oldEnc, multi.newEnc);132 128 } 133 129 … … 137 133 var newOperators = newEncoding.Operators; 138 134 139 140 var operators = oldOperators.Intersect(newOperators, comparer).Select(op => cloner.Clone(op)); 141 operators = operators.Union(newOperators, comparer).ToList(); 135 cloner.RegisterClonedObject(oldEncoding, newEncoding); 136 var operators = oldOperators.Intersect(newOperators, comparer) 137 .Select(cloner.Clone) 138 .Union(newOperators, comparer).ToList(); 142 139 143 140 newEncoding.ConfigureOperators(operators);
Note: See TracChangeset
for help on using the changeset viewer.