public static Expression Apply(ExponentialFunction function, Expression argument)
 {
     switch(function)
     {
         case ExponentialFunction.Ln:
             return Ln(argument);
         case ExponentialFunction.Exp:
             return Exp(argument);
         default:
             return ExpressionBuilder.CallDouble(_mathType, function.ToString(), argument);
     }
 }
Пример #2
0
        public static Expression Apply(ExponentialFunction function, Expression argument)
        {
            switch (function)
            {
            case ExponentialFunction.Ln:
                return(Ln(argument));

            case ExponentialFunction.Exp:
                return(Exp(argument));

            default:
                return(ExpressionBuilder.CallDouble(_mathType, function.ToString(), argument));
            }
        }
 protected override Expression VisitExponential(MethodCallExpression methodCall, ExponentialFunction function)
 {
     throw new NotSupportedException(String.Format("Exponential function {0} is not supported.", function.ToString()));
 }
Пример #4
0
 protected override Expression VisitExponential(MethodCallExpression methodCall, ExponentialFunction function)
 {
     throw new NotSupportedException(String.Format("Exponential function {0} is not supported.", function.ToString()));
 }