예제 #1
0
 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);
 }
예제 #2
0
 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);
 }