Changeset 4554
- Timestamp:
- 10/05/10 16:25:05 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DataAnalysis/HeuristicLab.Problems.DataAnalysis/3.3/Symbolic/SymbolicSimplifier.cs
r4462 r4554 354 354 while (sum.SubTrees.Count > 0) sum.RemoveSubTree(0); 355 355 var groupedVarNodes = from node in subtrees.OfType<VariableTreeNode>() 356 where node.Symbol.Name == "Variable" 356 357 group node by node.VariableName into g 357 358 select g; 358 var unchangedSubTrees = subtrees.Where(t => !(t is VariableTreeNode));359 var unchangedSubTrees = subtrees.Where(t => t.Symbol.Name != "Variable"); 359 360 360 361 foreach (var variableNodeGroup in groupedVarNodes) { … … 429 430 while (prod.SubTrees.Count > 0) prod.RemoveSubTree(0); 430 431 var groupedVarNodes = from node in subtrees.OfType<VariableTreeNode>() 432 where node.Symbol.Name == "Variable" 431 433 group node by node.VariableName into g 432 434 orderby g.Count() 433 435 select g; 434 436 var constantProduct = (from node in subtrees.OfType<VariableTreeNode>() 437 where node.Symbol.Name == "Variable" 435 438 select node.Weight) 436 439 .Concat(from node in subtrees.OfType<ConstantTreeNode>() … … 440 443 441 444 var unchangedSubTrees = from tree in subtrees 442 where !(tree is VariableTreeNode )445 where !(tree is VariableTreeNode && tree.Symbol.Name == "Variable") 443 446 where !(tree is ConstantTreeNode) 444 447 select tree;
Note: See TracChangeset
for help on using the changeset viewer.