Changeset 5733 for branches/DataAnalysis Refactoring/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/ArchitectureManipulators/SubroutineDuplicater.cs
- Timestamp:
- 03/17/11 14:07:47 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DataAnalysis Refactoring/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/ArchitectureManipulators/SubroutineDuplicater.cs
r5686 r5733 71 71 string newFunctionName = allowedFunctionNames.Except(UsedFunctionNames(symbolicExpressionTree)).First(); 72 72 duplicatedDefunBranch.FunctionName = newFunctionName; 73 symbolicExpressionTree.Root.AddSub Tree(duplicatedDefunBranch);73 symbolicExpressionTree.Root.AddSubtree(duplicatedDefunBranch); 74 74 duplicatedDefunBranch.SetGrammar((ISymbolicExpressionTreeGrammar)selectedBranch.Grammar.Clone()); 75 75 // add an invoke symbol for each branch that is allowed to invoke the original function 76 foreach (var subtree in symbolicExpressionTree.Root.Sub Trees.OfType<SymbolicExpressionTreeTopLevelNode>()) {76 foreach (var subtree in symbolicExpressionTree.Root.Subtrees.OfType<SymbolicExpressionTreeTopLevelNode>()) { 77 77 var matchingInvokeSymbol = (from symb in subtree.Grammar.Symbols.OfType<InvokeFunction>() 78 78 where symb.FunctionName == selectedBranch.FunctionName
Note: See TracChangeset
for help on using the changeset viewer.