- Timestamp:
- 06/30/10 15:12:41 (14 years ago)
- Location:
- trunk/sources
- Files:
-
- 5 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 -
trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/Symbolic/InteractiveSymbolicRegressionSolutionSimplifierView.cs
r3927 r3985 112 112 SymbolicExpressionTree tree = new SymbolicExpressionTree(root); 113 113 foreach (SymbolicExpressionTreeNode node in this.simplifiedExpressionTree.IterateNodesPrefix()) { 114 start.SubTrees.Clear();114 while(start.SubTrees.Count > 0) start.RemoveSubTree(0); 115 115 start.AddSubTree(node); 116 116 double constantTreeNodeValue = interpreter.GetSymbolicExpressionTreeValues(tree, Content.ProblemData.Dataset, trainingSamples).Median(); -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/SymbolicSimplifier.cs
r3904 r3985 53 53 private SymbolicExpressionTreeNode MacroExpand(SymbolicExpressionTreeNode root, SymbolicExpressionTreeNode node, IList<SymbolicExpressionTreeNode> argumentTrees) { 54 54 List<SymbolicExpressionTreeNode> subtrees = new List<SymbolicExpressionTreeNode>(node.SubTrees); 55 while (node.SubTrees.Count > 0) node. SubTrees.RemoveAt(0);55 while (node.SubTrees.Count > 0) node.RemoveSubTree(0); 56 56 if (node.Symbol is InvokeFunction) { 57 57 var invokeSym = node.Symbol as InvokeFunction; … … 214 214 } else { 215 215 var div = divSymbol.CreateTreeNode(); 216 div. SubTrees.Add(a);217 div. SubTrees.Add(b);216 div.AddSubTree(a); 217 div.AddSubTree(b); 218 218 return div; 219 219 } … … 270 270 } else { 271 271 var add = addSymbol.CreateTreeNode(); 272 add. SubTrees.Add(a);273 add. SubTrees.Add(b);272 add.AddSubTree(a); 273 add.AddSubTree(b); 274 274 MergeVariables(add); 275 275 return add;
Note: See TracChangeset
for help on using the changeset viewer.