Changeset 6774 for trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Tests/SymbolicDataAnalysisExpressionTreeSimplifierTest.cs
- Timestamp:
- 09/15/11 16:56:16 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Tests/SymbolicDataAnalysisExpressionTreeSimplifierTest.cs
r5915 r6774 131 131 } 132 132 { 133 // log transformation134 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 transformation140 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)))"); 142 142 Assert.AreEqual(formatter.Format(expectedTree), formatter.Format(actualTree)); 143 143 }
Note: See TracChangeset
for help on using the changeset viewer.