Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/30/10 15:12:41 (14 years ago)
Author:
gkronber
Message:

Fixed statements that modify the list of sub-trees of a SymbolicExpressionTreeNodes directly. #938

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/SymbolicSimplifier.cs

    r3904 r3985  
    5353    private SymbolicExpressionTreeNode MacroExpand(SymbolicExpressionTreeNode root, SymbolicExpressionTreeNode node, IList<SymbolicExpressionTreeNode> argumentTrees) {
    5454      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);
    5656      if (node.Symbol is InvokeFunction) {
    5757        var invokeSym = node.Symbol as InvokeFunction;
     
    214214      } else {
    215215        var div = divSymbol.CreateTreeNode();
    216         div.SubTrees.Add(a);
    217         div.SubTrees.Add(b);
     216        div.AddSubTree(a);
     217        div.AddSubTree(b);
    218218        return div;
    219219      }
     
    270270      } else {
    271271        var add = addSymbol.CreateTreeNode();
    272         add.SubTrees.Add(a);
    273         add.SubTrees.Add(b);
     272        add.AddSubTree(a);
     273        add.AddSubTree(b);
    274274        MergeVariables(add);
    275275        return add;
Note: See TracChangeset for help on using the changeset viewer.