Free cookie consent management tool by TermsFeed Policy Generator

Changeset 4554


Ignore:
Timestamp:
10/05/10 16:25:05 (14 years ago)
Author:
gkronber
Message:

Changed symbolic simplifier to handle time series specific terminals correctly. #1142

File:
1 edited

Legend:

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

    r4462 r4554  
    354354      while (sum.SubTrees.Count > 0) sum.RemoveSubTree(0);
    355355      var groupedVarNodes = from node in subtrees.OfType<VariableTreeNode>()
     356                            where node.Symbol.Name == "Variable"
    356357                            group node by node.VariableName into g
    357358                            select g;
    358       var unchangedSubTrees = subtrees.Where(t => !(t is VariableTreeNode));
     359      var unchangedSubTrees = subtrees.Where(t => t.Symbol.Name != "Variable");
    359360
    360361      foreach (var variableNodeGroup in groupedVarNodes) {
     
    429430      while (prod.SubTrees.Count > 0) prod.RemoveSubTree(0);
    430431      var groupedVarNodes = from node in subtrees.OfType<VariableTreeNode>()
     432                            where node.Symbol.Name == "Variable"
    431433                            group node by node.VariableName into g
    432434                            orderby g.Count()
    433435                            select g;
    434436      var constantProduct = (from node in subtrees.OfType<VariableTreeNode>()
     437                             where node.Symbol.Name == "Variable"
    435438                             select node.Weight)
    436439                            .Concat(from node in subtrees.OfType<ConstantTreeNode>()
     
    440443
    441444      var unchangedSubTrees = from tree in subtrees
    442                               where !(tree is VariableTreeNode)
     445                              where !(tree is VariableTreeNode && tree.Symbol.Name == "Variable")
    443446                              where !(tree is ConstantTreeNode)
    444447                              select tree;
Note: See TracChangeset for help on using the changeset viewer.