Changeset 5733 for branches/DataAnalysis Refactoring/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Creators/ProbabilisticTreeCreator.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/Creators/ProbabilisticTreeCreator.cs
r5727 r5733 89 89 startNode.SetGrammar(new SymbolicExpressionTreeGrammar(grammar)); 90 90 if (startNode.HasLocalParameters) startNode.ResetLocalParameters(random); 91 rootNode.AddSub Tree(startNode);91 rootNode.AddSubtree(startNode); 92 92 PTC2(random, startNode, maxTreeLength, maxTreeDepth); 93 93 tree.Root = rootNode; … … 120 120 } else { 121 121 // clean seedNode 122 while (seedNode.Sub Trees.Count() > 0) seedNode.RemoveSubTree(0);122 while (seedNode.Subtrees.Count() > 0) seedNode.RemoveSubtree(0); 123 123 } 124 124 // try a different length MAX_TRIES times … … 138 138 // insert a dummy sub-tree and add the pending extension to the list 139 139 var dummy = new SymbolicExpressionTreeNode(); 140 root.AddSub Tree(dummy);140 root.AddSubtree(dummy); 141 141 extensionPoints.Add(new TreeExtensionPoint { Parent = root, ChildIndex = i, ExtensionPointDepth = 0 }); 142 142 } … … 162 162 ISymbolicExpressionTreeNode newTree = selectedSymbol.CreateTreeNode(); 163 163 if (newTree.HasLocalParameters) newTree.ResetLocalParameters(random); 164 parent.RemoveSub Tree(argumentIndex);165 parent.InsertSub Tree(argumentIndex, newTree);164 parent.RemoveSubtree(argumentIndex); 165 parent.InsertSubtree(argumentIndex, newTree); 166 166 167 167 var topLevelNode = newTree as SymbolicExpressionTreeTopLevelNode; … … 177 177 // insert a dummy sub-tree and add the pending extension to the list 178 178 var dummy = new SymbolicExpressionTreeNode(); 179 newTree.AddSub Tree(dummy);179 newTree.AddSubtree(dummy); 180 180 extensionPoints.Add(new TreeExtensionPoint { Parent = newTree, ChildIndex = i, ExtensionPointDepth = extensionDepth + 1 }); 181 181 } … … 207 207 var tree = selectedSymbol.CreateTreeNode(); 208 208 if (tree.HasLocalParameters) tree.ResetLocalParameters(random); 209 parent.RemoveSub Tree(childIndex);210 parent.InsertSub Tree(childIndex, tree);209 parent.RemoveSubtree(childIndex); 210 parent.InsertSubtree(childIndex, tree); 211 211 212 212 var topLevelNode = tree as SymbolicExpressionTreeTopLevelNode; … … 217 217 // insert a dummy sub-tree and add the pending extension to the list 218 218 var dummy = new SymbolicExpressionTreeNode(); 219 tree.AddSub Tree(dummy);219 tree.AddSubtree(dummy); 220 220 // replace the just inserted dummy by recursive application 221 221 ReplaceWithMinimalTree(random, root, tree, i);
Note: See TracChangeset
for help on using the changeset viewer.