17 #ifndef _ExprFuncStandard_h_
18 #define _ExprFuncStandard_h_
52 typedef double Func2(
double,
double);
53 typedef double Func3(
double,
double,
double);
54 typedef double Func4(
double,
double,
double,
double);
55 typedef double Func5(
double,
double,
double,
double,
double);
56 typedef double Func6(
double,
double,
double,
double,
double,
double);
61 typedef double Funcn(
int n,
double* params);
91 :
_type(
FUNC2), _retType(ExprType().FP(1).Varying()), _scalar(true),
_func((void*)f), _minargs(2), _maxargs(2)
95 :
_type(
FUNC3), _retType(ExprType().FP(1).Varying()), _scalar(true),
_func((void*)f), _minargs(3), _maxargs(3)
99 :
_type(
FUNC4), _retType(ExprType().FP(1).Varying()), _scalar(true),
_func((void*)f), _minargs(4), _maxargs(4)
103 :
_type(
FUNC5), _retType(ExprType().FP(1).Varying()), _scalar(true),
_func((void*)f), _minargs(5), _maxargs(5)
107 :
_type(
FUNC6), _retType(ExprType().FP(1).Varying()), _scalar(true),
_func((void*)f), _minargs(6), _maxargs(6)
111 :
_type(
FUNC1V), _retType(ExprType().FP(1).Varying()), _scalar(true),
_func((void*)f), _minargs(1), _maxargs(1)
115 :
_type(
FUNC2V), _retType(ExprType().FP(1).Varying()), _scalar(true),
_func((void*)f), _minargs(2), _maxargs(2)
119 :
_type(
FUNC1VV), _retType(ExprType().FP(3).Varying()), _scalar(false),
_func((void*)f), _minargs(1), _maxargs(1)
123 :
_type(
FUNC2VV), _retType(ExprType().FP(3).Varying()), _scalar(false),
_func((void*)f), _minargs(2), _maxargs(2)
127 :
_type(
FUNCN), _retType(ExprType().FP(1).Varying()), _scalar(true),
_func((void*)f), _minargs(min), _maxargs(max)
131 :
_type(
FUNCNV), _retType(ExprType().FP(1).Varying()), _scalar(true),
_func((void*)f), _minargs(min), _maxargs(max)
135 :
_type(
FUNCNVV), _retType(ExprType().FP(3).Varying()), _scalar(false),
_func((void*)f), _minargs(min), _maxargs(max)
double Func2v(const Vec3d &, const Vec3d &)
double Func3(double, double, double)
double Func1v(const Vec3d &)
Function Definition, used in parse tree and func table.
double Funcnv(int n, const Vec3d *params)
Vec3d Funcnvv(int n, const Vec3d *params)
void * getFuncPointer() const
Vec3d Func1vv(const Vec3d &)
with numParticles numAttributes A variable block contains variable names and types but doesn t care what the values are< pre > void f(const std::string &s, MyParticleData *p, int outputDim=3)
double Func6(double, double, double, double, double, double)
Vec3d Func2vv(const Vec3d &, const Vec3d &)
double max(double x, double y)
Node that calls a function.
double min(double x, double y)
virtual int buildInterpreter(const ExprFuncNode *node, Interpreter *interpreter) const
Build an interpreter to evaluate the expression.
double Funcn(int n, double *params)
ExprFuncStandard(FuncType funcType, void *f)
No argument function.
double Func5(double, double, double, double, double)
virtual ExprType prep(ExprFuncNode *node, bool scalarWanted, ExprVarEnvBuilder &envBuilder) const
double Func4(double, double, double, double)
Extension function spec, used for complicated argument custom functions.
FuncType getFuncType() const
double Func2(double, double)
Variable scope builder is used by the type checking and code gen to track visiblity of variables and ...