public IFunction ToInput(LExpression parameter, ICLRBoundaryMap rootTypeMap, CompilationContext context) { var arg = parameter; if (arg.Type != typeof(float)) { if (arg.Type == typeof(bool)) { arg = LExpression.Condition(arg, LExpression.Constant(1f), LExpression.Constant(0f)); } else { arg = LExpression.Convert(arg, typeof(float)); } } return(new SingleInputExpr(arg)); }
public Input1DFunc(Expression parameter, Dictionary <string, string> map, ICLRBoundaryMap rootTypeMap) { _parameter = parameter; _map = map; _rootTypeMap = rootTypeMap; }
public static TDelegate Compile <TDelegate>(this IFunction function, ICLRBoundaryMap translator = null, CompilationContext info = null) where TDelegate : Delegate? => (TDelegate)function.Compile(typeof(TDelegate), translator, info);
public IFunction ToInput(System.Linq.Expressions.Expression parameter, ICLRBoundaryMap rootTypeMap, CompilationContext info) => new Array1DFunc(parameter);
public static TDelegate Compile <TDelegate>(this IFunction function, CompilationInput input, ICLRBoundaryMap boundaryMap = null) where TDelegate : Delegate? => (TDelegate)function.Compile(typeof(TDelegate), input, boundaryMap);