I am started using the Alglib library specifically "spline1dbuildlinear' function.
When using a small dataset (for X & Y) for example the code script bellow, it's working fine:
vector<double> X(5), Y(5);
X[0]=0.1;
X[1]=0.4;
X[2]=1.2;
X[3]=1.8;
X[4]=2.0;
Y[0]=0.1;
Y[1]=0.7;
Y[2]=0.6;
Y[3]=1.1;
Y[4]=0.9;
AX.setcontent(X.size(), &(X[0]));
AY.setcontent(Y.size(), &(Y[0]));
alglib::spline1dinterpolant spline;
alglib::spline1dbuildlinear(AX, AY, X.size(), spline);
But when Using X & Y vector contains double elements those are of "1995" size its throwing an exception in the block catch(alglib_impl::ae_error_type).
After trying to find any solution over internet I find I might need to use:
alglib_impl::ae_state *_state;
the state initialization function, but couldn't figure out the proper way to debug. Any suggestions will be much appreciated.