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); } }
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())); }