Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/21/10 14:18:06 (14 years ago)
Author:
gkronber
Message:

Changed symbolic simplifier to work for multi-variate models and return a symbolic expression tree that can be directly evaluated. #1142

File:
1 edited

Legend:

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

    r4389 r4462  
    4444      // macro expand (initially no argument trees)
    4545      var macroExpandedTree = MacroExpand(clone, clone.SubTrees[0], new List<SymbolicExpressionTreeNode>());
    46       return new SymbolicExpressionTree(GetSimplifiedTree(macroExpandedTree));
     46      SymbolicExpressionTreeNode rootNode = (new ProgramRootSymbol()).CreateTreeNode();
     47      rootNode.AddSubTree(GetSimplifiedTree(macroExpandedTree));
     48      return new SymbolicExpressionTree(rootNode);
    4749    }
    4850
     
    6365        // return the correct argument sub-tree (already macro-expanded)
    6466        return (SymbolicExpressionTreeNode)argumentTrees[argSym.ArgumentIndex].Clone();
    65       } else if (node.Symbol is StartSymbol) {
    66         return MacroExpand(root, subtrees[0], argumentTrees);
    6767      } else {
    6868        // recursive application
Note: See TracChangeset for help on using the changeset viewer.