Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/17/11 14:07:47 (14 years ago)
Author:
mkommend
Message:

#1418: Corrected problem interfaces & unified naming of subtrees.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/DataAnalysis Refactoring/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Creators/ProbabilisticTreeCreator.cs

    r5727 r5733  
    8989      startNode.SetGrammar(new SymbolicExpressionTreeGrammar(grammar));
    9090      if (startNode.HasLocalParameters) startNode.ResetLocalParameters(random);
    91       rootNode.AddSubTree(startNode);
     91      rootNode.AddSubtree(startNode);
    9292      PTC2(random, startNode, maxTreeLength, maxTreeDepth);
    9393      tree.Root = rootNode;
     
    120120        } else {
    121121          // clean seedNode
    122           while (seedNode.SubTrees.Count() > 0) seedNode.RemoveSubTree(0);
     122          while (seedNode.Subtrees.Count() > 0) seedNode.RemoveSubtree(0);
    123123        }
    124124        // try a different length MAX_TRIES times
     
    138138        // insert a dummy sub-tree and add the pending extension to the list
    139139        var dummy = new SymbolicExpressionTreeNode();
    140         root.AddSubTree(dummy);
     140        root.AddSubtree(dummy);
    141141        extensionPoints.Add(new TreeExtensionPoint { Parent = root, ChildIndex = i, ExtensionPointDepth = 0 });
    142142      }
     
    162162          ISymbolicExpressionTreeNode newTree = selectedSymbol.CreateTreeNode();
    163163          if (newTree.HasLocalParameters) newTree.ResetLocalParameters(random);
    164           parent.RemoveSubTree(argumentIndex);
    165           parent.InsertSubTree(argumentIndex, newTree);
     164          parent.RemoveSubtree(argumentIndex);
     165          parent.InsertSubtree(argumentIndex, newTree);
    166166
    167167          var topLevelNode = newTree as SymbolicExpressionTreeTopLevelNode;
     
    177177            // insert a dummy sub-tree and add the pending extension to the list
    178178            var dummy = new SymbolicExpressionTreeNode();
    179             newTree.AddSubTree(dummy);
     179            newTree.AddSubtree(dummy);
    180180            extensionPoints.Add(new TreeExtensionPoint { Parent = newTree, ChildIndex = i, ExtensionPointDepth = extensionDepth + 1 });
    181181          }
     
    207207      var tree = selectedSymbol.CreateTreeNode();
    208208      if (tree.HasLocalParameters) tree.ResetLocalParameters(random);
    209       parent.RemoveSubTree(childIndex);
    210       parent.InsertSubTree(childIndex, tree);
     209      parent.RemoveSubtree(childIndex);
     210      parent.InsertSubtree(childIndex, tree);
    211211
    212212      var topLevelNode = tree as SymbolicExpressionTreeTopLevelNode;
     
    217217        // insert a dummy sub-tree and add the pending extension to the list
    218218        var dummy = new SymbolicExpressionTreeNode();
    219         tree.AddSubTree(dummy);
     219        tree.AddSubtree(dummy);
    220220        // replace the just inserted dummy by recursive application
    221221        ReplaceWithMinimalTree(random, root, tree, i);
Note: See TracChangeset for help on using the changeset viewer.