1 #ifndef __INTERPOLATING_FUNCTION_ALGLIB_H 2 #define __INTERPOLATING_FUNCTION_ALGLIB_H 4 #include "../Core/SharedLibraryExportMacros.h" 6 #include "SerializableSpline1dInterpolant.h" 7 #include "InterpSolutionIterator.h" 16 friend class boost::serialization::access;
21 template<
class Archive>
23 ar & boost::serialization::base_object<OneArgumentDiffFunction>(
27 ar & __min_x & __max_x;
49 const std::valarray<double> &x,
52 const std::valarray<double> &y,
56 const std::valarray<double> &yprime=
57 std::valarray<double>(),
68 int degrees_of_freedom=-1
74 (yprime.size() ? &(yprime[0]) : NULL),
79 assert(x.size() == y.size());
80 assert(yprime.size() == 0 || yprime.size() == x.size());
98 const double *yprime = NULL,
103 double smoothing=
NaN,
109 int degrees_of_freedom=-1);
114 {
return alglib::spline1dcalc(__spline, x);}
124 alglib::spline1ddiff(__spline, x, v, dv, d2v);
A hierarchy of classes representing functions.
SerializableSpline1dInterpolant __spline
The interpolating function information necessary to evaluate at any given point.
const CubicSplineDerivatives * deriv(double x) const
The derivatives of the interpolating function at the given abscissa.
double range_high() const
The maximum abscissa at which the function is defined.
A serializable (using boost serialization) alglib 1D interpolant.
A class representing a once differentiable function of a single argument.
InterpolatingFunctionALGLIB()
Needed by the Boost serializer.
An iterator over a set of solutions to an interpolating function.
double range_low() const
The minimum abscissa at which the function is defined.
double __min_x
The smallest abscissa covered by the spline points.
A class representing a function that is identically zero.
Function which interpolates, with possible smoothing, between points.
A class for the derivatives of a cubic spline (=0 for order>2).
InterpolatingFunctionALGLIB(const std::valarray< double > &x, const std::valarray< double > &y, const std::valarray< double > &yprime=std::valarray< double >(), double smoothing=NaN, int degrees_of_freedom=-1)
Constuct an interpolating function.
const double NaN
Not a number.
double operator()(double x) const
Returns the value of the interpolating function at the given abscissa.
void serialize(Archive &ar, const unsigned int)
Serialize this function.