Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
08/16/10 10:08:29 (14 years ago)
Author:
gkronber
Message:

added comments to simplifier. #1026

File:
1 edited

Legend:

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

    r4220 r4226  
    114114      return original.Symbol is Logarithm;
    115115    }
     116    private bool IsIfThenElse(SymbolicExpressionTreeNode original) {
     117      return original.Symbol is IfThenElse;
     118    }
    116119    #endregion
    117120
     
    135138        return SimplifyAverage(original);
    136139      } else if (IsLog(original)) {
    137         // TODO simplify logarditm
     140        // TODO simplify logarithm
     141        return SimplifyAny(original);
     142      } else if (IsIfThenElse(original)) {
     143        // TODO simplify conditionals
    138144        return SimplifyAny(original);
    139145      } else if (IsAverage(original)) {
     
    238244
    239245    #region low level tree restructuring
    240     // each make* method must return a simplified tree
     246    // MakeFraction, MakeProduct and MakeSum take two already simplified trees and create a new simplified tree
    241247
    242248    private SymbolicExpressionTreeNode MakeFraction(SymbolicExpressionTreeNode a, SymbolicExpressionTreeNode b) {
     
    341347    }
    342348
     349    // makes sure variable symbols in sums are combined
     350    // possible improvment: combine sums of products where the products only reference the same variable
    343351    private void MergeVariablesInSum(SymbolicExpressionTreeNode sum) {
    344352      var subtrees = new List<SymbolicExpressionTreeNode>(sum.SubTrees);
     
    415423    #endregion
    416424
     425    // helper to combine the constant factors in products and to combine variables (powers of 2, 3...)
    417426    private void MergeVariablesAndConstantsInProduct(SymbolicExpressionTreeNode prod) {
    418427      var subtrees = new List<SymbolicExpressionTreeNode>(prod.SubTrees);
Note: See TracChangeset for help on using the changeset viewer.