Hi,
I was thinking about registering custom input/return functions like:
static std::vector<float> aggregate(MathPresso::mreal_t x, MathPresso::mreal_t y) {
std::vector<float> ret;
ret.push_back(x);
ret.push_back(y);
ret.push_back(x+y);
return ret;
}
// and then
ctx.addFunction("agg", (void *) aggregate, MathPresso::MFUNC_F_ARG2);
Compiles OK, but as evaluated, the expression returns real type, which crashes of course.
Is there a way that I can define functions working on vector type?
Hi,
I was thinking about registering custom input/return functions like:
Compiles OK, but as evaluated, the expression returns real type, which crashes of course.
Is there a way that I can define functions working on vector type?