static Expr InverseFunctionConvolution(IContext context, Expr arg) { return arg .ConvertAs<FunctionExpr>() .If(x => context.GetFunction(x.FunctionName) is ExpFunction) .Return(x => x.Args.First(), () => null); }
static Expr PowerConvolution(IContext context, Expr arg) { return arg .ConvertAs<PowerExpr>() .Return(x => Expr.Multiply(x.Right, FunctionFactory.Ln(x.Left)), () => null); }
ConstantExpr EvalConvolution(Expr arg) { return arg.ConvertAs<ConstantExpr>().If(x => x.Value.IsFloat).Return(x => Expr.Constant(Evaluate(x.Value)), () => null); }