Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/08/19 08:53:54 (5 years ago)
Author:
gkronber
Message:

#2866: added support for tanh to the remaining interpreters (native is missing)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/SymbolicDataAnalysisExpressionCompiledTreeInterpreter.cs

    r16565 r16668  
    4545    private static readonly MethodInfo Cos = typeof(Math).GetMethod("Cos", new[] { typeof(double) });
    4646    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) });
    4748    private static readonly MethodInfo Sqrt = typeof(Math).GetMethod("Sqrt", new[] { typeof(double) });
    4849    private static readonly MethodInfo Floor = typeof(Math).GetMethod("Floor", new[] { typeof(double) });
     
    223224            return Expression.Call(Tan, arg);
    224225          }
     226        case OpCodes.Tanh: {
     227            var arg = MakeExpr(node.GetSubtree(0), variableIndices, row, columns);
     228            return Expression.Call(Tanh, arg);
     229          }
    225230        case OpCodes.Square: {
    226231            var arg = MakeExpr(node.GetSubtree(0), variableIndices, row, columns);
Note: See TracChangeset for help on using the changeset viewer.