Hi,
I would like to integrate a function from a class but it does not work because the types do not match.
Have anybody solved this issue before?
Below is an example.
Thank you for your help,
Bests,
Romain
Code:
using namespace alglib;
using namespace std;
class myClass{
public:
myClass()
{
}
~myClass()
{
}
void Sig(const real_1d_array &y, double x, real_1d_array &dy, void *ptr)
{
dy[0] = -y[0];
}
};
int main(int argc, char **argv)
{
myClass A();
real_1d_array y = "[1]";
real_1d_array x = "[0, 1]";
double eps = 0.00001;
double h = 0;
odesolverstate s;
ae_int_t m;
real_1d_array xtbl;
real_2d_array ytbl;
odesolverreport rep;
odesolverrkck(y, x, eps, h, s);
alglib::odesolversolve(s, A.Sig);
odesolverresults(s, m, xtbl, ytbl, rep);
return 0;
}