1 #include "InterpolatingFunctionALGLIB.h" 15 int degrees_of_freedom
18 if(degrees_of_freedom<0) degrees_of_freedom=std::min(
19 -degrees_of_freedom, static_cast<int>(3 * num_points));
21 alglib::real_1d_array alglib_x;
22 alglib_x.setcontent(num_points, x);
23 alglib::real_1d_array alglib_y;
24 alglib_y.setcontent(num_points, y);
26 alglib::real_1d_array alglib_yprime;
27 if(yprime) alglib_yprime.setcontent(num_points, yprime);
29 auto x_range = std::minmax_element(x, x + num_points);
33 if(std::isnan(smoothing)) {
35 alglib::spline1dbuildhermite(alglib_x,
40 alglib::spline1dbuildcubic(alglib_x,
47 "Smoothing not supported when derivatives " 48 "are specified in InterpolatingFunctionALGLIB " 50 alglib::ae_int_t fit_info;
51 alglib::spline1dfitreport fit_report;
52 alglib::spline1dfitpenalized(alglib_x,
Function arguments do not satisfy some requirement.
SerializableSpline1dInterpolant __spline
The interpolating function information necessary to evaluate at any given point.
Error detected by the ALGLIB library.
InterpolatingFunctionALGLIB()
Needed by the Boost serializer.
double __max_x
The largest abscissa covered by the spline points.
An iterator over a set of solutions to an interpolating function.
double __min_x
The smallest abscissa covered by the spline points.
Function which interpolates, with possible smoothing, between points.
InterpSolutionIterator crossings(double y=0) const
Iterator over the abscissas where the function takes the given y value.