Alglib when using "spline1dbuildlinear" getting exception in block catch (alglib_impl :: ae_error_type)
I started using the Alglib library specifically for the spline1dbuildlinear function.
When using a small dataset (for X and Y), like the script code below, it works 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 and Y, the vector contains double elements whose size is "1995" and it throws an exception into the block lock (alglib_impl :: ae_error_type).
After trying to find any solution over the internet, I found that I might need to use:
alglib_impl::ae_state *_state;
state initialization function but couldn't find the correct way to debug. Any suggestions would be much appreciated.
+3
source to share
No one has answered this question yet
Check out similar questions: