Changeset 16428 for branches/2845_EnhancedProgress/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionCompiledTreeInterpreter.cs
- Timestamp:
- 12/21/18 10:31:49 (6 years ago)
- Location:
- branches/2845_EnhancedProgress
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2845_EnhancedProgress
- Property svn:mergeinfo changed
-
branches/2845_EnhancedProgress/HeuristicLab.Problems.DataAnalysis.Symbolic
- Property svn:mergeinfo changed
-
branches/2845_EnhancedProgress/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionCompiledTreeInterpreter.cs
r16311 r16428 41 41 42 42 #region method info for the commonly called functions 43 private static readonly MethodInfo Abs = typeof(Math).GetMethod("Abs", new[] { typeof(double) }); 43 44 private static readonly MethodInfo Sin = typeof(Math).GetMethod("Sin", new[] { typeof(double) }); 44 45 private static readonly MethodInfo Cos = typeof(Math).GetMethod("Cos", new[] { typeof(double) }); … … 207 208 return Expression.Divide(result, Expression.Constant((double)node.SubtreeCount)); 208 209 } 210 case OpCodes.Absolute: { 211 var arg = MakeExpr(node.GetSubtree(0), variableIndices, row, columns); 212 return Expression.Call(Abs, arg); 213 } 209 214 case OpCodes.Cos: { 210 215 var arg = MakeExpr(node.GetSubtree(0), variableIndices, row, columns); … … 222 227 var arg = MakeExpr(node.GetSubtree(0), variableIndices, row, columns); 223 228 return Expression.Power(arg, Expression.Constant(2.0)); 229 } 230 case OpCodes.Cube: { 231 var arg = MakeExpr(node.GetSubtree(0), variableIndices, row, columns); 232 return Expression.Power(arg, Expression.Constant(3.0)); 224 233 } 225 234 case OpCodes.Power: { … … 231 240 var arg = MakeExpr(node.GetSubtree(0), variableIndices, row, columns); 232 241 return Expression.Call(Sqrt, arg); 242 } 243 case OpCodes.CubeRoot: { 244 var arg = MakeExpr(node.GetSubtree(0), variableIndices, row, columns); 245 return Expression.Power(arg, Expression.Constant(1.0 / 3.0)); 233 246 } 234 247 case OpCodes.Root: { … … 493 506 Expression.Assign(result, Expression.Call(Bessel, arg))), 494 507 result); 508 } 509 case OpCodes.AnalyticQuotient: { 510 var x1 = MakeExpr(node.GetSubtree(0), variableIndices, row, columns); 511 var x2 = MakeExpr(node.GetSubtree(1), variableIndices, row, columns); 512 return Expression.Divide(x1, 513 Expression.Call(Sqrt, 514 Expression.Add( 515 Expression.Constant(1.0), 516 Expression.Multiply(x2, x2)))); 495 517 } 496 518 case OpCodes.IfThenElse: {
Note: See TracChangeset
for help on using the changeset viewer.