Changeset 3985 for trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/ArchitectureManipulators
- Timestamp:
- 06/30/10 15:12:41 (15 years ago)
- Location:
- trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/ArchitectureManipulators
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/ArchitectureManipulators/ArgumentCreater.cs
r3539 r3985 136 136 // call recursively for all subtree 137 137 List<SymbolicExpressionTreeNode> subtrees = new List<SymbolicExpressionTreeNode>(branch.SubTrees); 138 while (branch.SubTrees.Count > 0) branch. SubTrees.RemoveAt(0);138 while (branch.SubTrees.Count > 0) branch.RemoveSubTree(0); 139 139 foreach (var subtree in subtrees) { 140 140 branch.AddSubTree(ReplaceArgumentsInBranch(subtree, argumentTrees)); -
trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/ArchitectureManipulators/SubroutineCreater.cs
r3539 r3985 168 168 // remove the subtrees so that we can clone only the root node 169 169 List<SymbolicExpressionTreeNode> subtrees = new List<SymbolicExpressionTreeNode>(node.SubTrees); 170 while (node.SubTrees.Count > 0) node. SubTrees.RemoveAt(0);170 while (node.SubTrees.Count > 0) node.RemoveSubTree(0); 171 171 // recursively apply function for subtrees or append a argument terminal node 172 172 foreach (var subtree in subtrees) { -
trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/ArchitectureManipulators/SubroutineDuplicater.cs
r3722 r3985 70 70 string newFunctionName = allowedFunctionNames.Except(UsedFunctionNames(symbolicExpressionTree)).First(); 71 71 duplicatedDefunBranch.FunctionName = newFunctionName; 72 symbolicExpressionTree.Root. SubTrees.Add(duplicatedDefunBranch);72 symbolicExpressionTree.Root.AddSubTree(duplicatedDefunBranch); 73 73 duplicatedDefunBranch.Grammar = (ISymbolicExpressionGrammar)selectedBranch.Grammar.Clone(); 74 74 // add an invoke symbol for each branch that is allowed to invoke the original function
Note: See TracChangeset
for help on using the changeset viewer.