Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/25/11 18:09:47 (14 years ago)
Author:
mkommend
Message:

ticket #1256 - Changed SymbolicSimplifier to handle lagged variables correctly.

File:
1 edited

Legend:

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

    r5108 r5377  
    354354      while (sum.SubTrees.Count > 0) sum.RemoveSubTree(0);
    355355      var groupedVarNodes = from node in subtrees.OfType<VariableTreeNode>()
    356                             group node by node.VariableName into g
     356                            let lag = (node is LaggedVariableTreeNode) ? ((LaggedVariableTreeNode)node).Lag : 0
     357                            group node by node.VariableName + lag into g
    357358                            select g;
     359
    358360      var unchangedSubTrees = subtrees.Where(t => !(t is VariableTreeNode));
    359361
     
    429431      while (prod.SubTrees.Count > 0) prod.RemoveSubTree(0);
    430432      var groupedVarNodes = from node in subtrees.OfType<VariableTreeNode>()
    431                             group node by node.VariableName into g
     433                            let lag = (node is LaggedVariableTreeNode) ? ((LaggedVariableTreeNode)node).Lag : 0
     434                            group node by node.VariableName + lag into g
    432435                            orderby g.Count()
    433436                            select g;
Note: See TracChangeset for help on using the changeset viewer.