Changeset 16668
- Timestamp:
- 03/08/19 08:53:54 (6 years ago)
- Location:
- trunk/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionCompiledTreeInterpreter.cs
r16565 r16668 45 45 private static readonly MethodInfo Cos = typeof(Math).GetMethod("Cos", new[] { typeof(double) }); 46 46 private static readonly MethodInfo Tan = typeof(Math).GetMethod("Tan", new[] { typeof(double) }); 47 private static readonly MethodInfo Tanh = typeof(Math).GetMethod("Tanh", new[] { typeof(double) }); 47 48 private static readonly MethodInfo Sqrt = typeof(Math).GetMethod("Sqrt", new[] { typeof(double) }); 48 49 private static readonly MethodInfo Floor = typeof(Math).GetMethod("Floor", new[] { typeof(double) }); … … 223 224 return Expression.Call(Tan, arg); 224 225 } 226 case OpCodes.Tanh: { 227 var arg = MakeExpr(node.GetSubtree(0), variableIndices, row, columns); 228 return Expression.Call(Tanh, arg); 229 } 225 230 case OpCodes.Square: { 226 231 var arg = MakeExpr(node.GetSubtree(0), variableIndices, row, columns); -
trunk/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionTreeILEmittingInterpreter.cs
r16585 r16668 45 45 private static MethodInfo sin = typeof(Math).GetMethod("Sin", new Type[] { typeof(double) }); 46 46 private static MethodInfo tan = typeof(Math).GetMethod("Tan", new Type[] { typeof(double) }); 47 private static MethodInfo tanh = typeof(Math).GetMethod("Tanh", new Type[] { typeof(double) }); 47 48 private static MethodInfo exp = typeof(Math).GetMethod("Exp", new Type[] { typeof(double) }); 48 49 private static MethodInfo log = typeof(Math).GetMethod("Log", new Type[] { typeof(double) }); … … 283 284 CompileInstructions(il, state, ds); 284 285 il.Emit(System.Reflection.Emit.OpCodes.Call, tan); 286 return; 287 } 288 case OpCodes.Tan: { 289 CompileInstructions(il, state, ds); 290 il.Emit(System.Reflection.Emit.OpCodes.Call, tanh); 285 291 return; 286 292 } -
trunk/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionTreeInterpreter.cs
r16656 r16668 217 217 return Math.Tan(Evaluate(dataset, ref row, state)); 218 218 } 219 case OpCodes.Tanh: { 220 return Math.Tanh(Evaluate(dataset, ref row, state)); 221 } 219 222 case OpCodes.Square: { 220 223 return Math.Pow(Evaluate(dataset, ref row, state), 2);
Note: See TracChangeset
for help on using the changeset viewer.