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)
Node that calls a function.
virtual int buildInterpreter(const ExprFuncNode *node, Interpreter *interpreter) const
Build an interpreter to evaluate the expression.
double Func5(double, double, double, double, double)
double Func1v(const Vec3d &)
ExprFuncStandard(FuncType funcType, void *f)
No argument function.
Vec3d Func1vv(const Vec3d &)
double Func2v(const Vec3d &, const Vec3d &)
double Funcn(int n, double *params)
double Func6(double, double, double, double, double, double)
double Func2(double, double)
double Func3(double, double, double)
double Funcnv(int n, const Vec3d *params)
FuncType getFuncType() const
virtual ExprType prep(ExprFuncNode *node, bool scalarWanted, ExprVarEnvBuilder &envBuilder) const
Vec3d Funcnvv(int n, const Vec3d *params)
Vec3d Func2vv(const Vec3d &, const Vec3d &)
double Func4(double, double, double, double)
void * getFuncPointer() const
Extension function spec, used for complicated argument custom functions.
Function Definition, used in parse tree and func table.
Variable scope builder is used by the type checking and code gen to track visiblity of variables and ...
double max(double x, double y)
double min(double x, double y)
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)