Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/16/11 12:00:36 (13 years ago)
Author:
mkommend
Message:

#1479: Integrated trunk changes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/GP.Grammar.Editor/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Tests/SymbolicDataAnalysisExpressionTreeSimplifierTest.cs

    r5915 r6784  
    131131      }
    132132      {
    133         // log transformation
    134         var actualTree = simplifier.Simplify(importer.Import("(log (* (variable 2.0 a) (variable 3.0 b)))"));
    135         var expectedTree = importer.Import("(+ (log (variable 1.0 a)) (log (variable 1.0 b)) 1.7918)");
    136         Assert.AreEqual(formatter.Format(expectedTree), formatter.Format(actualTree));
    137       }
    138       {
    139         // log transformation
    140         var actualTree = simplifier.Simplify(importer.Import("(log (/ (variable 2.0 a) (variable 3.0 b)))"));
    141         var expectedTree = importer.Import("(- (log (variable 2.0 a)) (log (variable 3.0 b)))");
     133        // must not transform logs in this way as we do not know wether both variables are positive
     134        var actualTree = simplifier.Simplify(importer.Import("(log (* (variable 1.0 a) (variable 1.0 b)))"));
     135        var expectedTree = importer.Import("(log (* (variable 1.0 a) (variable 1.0 b)))");
     136        Assert.AreEqual(formatter.Format(expectedTree), formatter.Format(actualTree));
     137      }
     138      {
     139        // must not transform logs in this way as we do not know wether both variables are positive
     140        var actualTree = simplifier.Simplify(importer.Import("(log (/ (variable 1.0 a) (variable 1.0 b)))"));
     141        var expectedTree = importer.Import("(log (/ (variable 1.0 a) (variable 1.0 b)))");
    142142        Assert.AreEqual(formatter.Format(expectedTree), formatter.Format(actualTree));
    143143      }
Note: See TracChangeset for help on using the changeset viewer.