Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/22/15 22:18:35 (10 years ago)
Author:
mkommend
Message:

#2175: Merged trunk changes.

Location:
branches/DataAnalysis.ComplexityAnalyzer
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/DataAnalysis.ComplexityAnalyzer/HeuristicLab.Problems.DataAnalysis.Symbolic

  • branches/DataAnalysis.ComplexityAnalyzer/HeuristicLab.Problems.DataAnalysis.Symbolic.Regression

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • branches/DataAnalysis.ComplexityAnalyzer/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisExpressionTreeSimplifier.cs

    r12130 r12233  
    299299        // simplify expressions x0..xn
    300300        // make multiplication (x0 * 1/(x1 * x1 * .. * xn))
    301         var simplifiedTrees = original.Subtrees.Select(x => GetSimplifiedTree(x));
     301        var simplifiedTrees = original.Subtrees.Select(GetSimplifiedTree).ToArray();
    302302        return
    303           MakeProduct(simplifiedTrees.First(), Invert(simplifiedTrees.Skip(1).Aggregate((a, b) => MakeProduct(a, b))));
     303          MakeProduct(simplifiedTrees.First(), Invert(simplifiedTrees.Skip(1).Aggregate(MakeProduct)));
    304304      }
    305305    }
     
    310310      } else {
    311311        return original.Subtrees
    312           .Select(x => GetSimplifiedTree(x))
    313           .Aggregate((a, b) => MakeProduct(a, b));
     312          .Select(GetSimplifiedTree).ToArray()
     313          .Aggregate(MakeProduct);
    314314      }
    315315    }
     
    321321        // simplify expressions x0..xn
    322322        // make addition (x0,-x1..-xn)
    323         var simplifiedTrees = original.Subtrees.Select(x => GetSimplifiedTree(x));
     323        var simplifiedTrees = original.Subtrees.Select(GetSimplifiedTree).ToArray();
    324324        return simplifiedTrees.Take(1)
    325           .Concat(simplifiedTrees.Skip(1).Select(x => Negate(x)))
    326           .Aggregate((a, b) => MakeSum(a, b));
     325          .Concat(simplifiedTrees.Skip(1).Select(Negate))
     326          .Aggregate(MakeSum);
    327327      }
    328328    }
     
    335335        // make addition (x0..xn)
    336336        return original.Subtrees
    337           .Select(x => GetSimplifiedTree(x))
    338           .Aggregate((a, b) => MakeSum(a, b));
     337          .Select(GetSimplifiedTree).ToArray()
     338          .Aggregate(MakeSum);
    339339      }
    340340    }
Note: See TracChangeset for help on using the changeset viewer.