Function which interpolates, with possible smoothing, between points. More...
#include <InterpolatingFunctionALGLIB.h>
Public Member Functions | |
InterpolatingFunctionALGLIB () | |
Needed by the Boost serializer. More... | |
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. More... | |
InterpolatingFunctionALGLIB (const double *x, const double *y, size_t num_points, const double *yprime=NULL, double smoothing=NaN, int degrees_of_freedom=-1) | |
Constuct an interpolating function. More... | |
double | operator() (double x) const |
Returns the value of the interpolating function at the given abscissa. More... | |
const CubicSplineDerivatives * | deriv (double x) const |
The derivatives of the interpolating function at the given abscissa. More... | |
double | range_high () const |
The maximum abscissa at which the function is defined. More... | |
double | range_low () const |
The minimum abscissa at which the function is defined. More... | |
InterpSolutionIterator | crossings (double y=0) const |
Iterator over the abscissas where the function takes the given y value. More... | |
Public Member Functions inherited from Core::OneArgumentFunction< double, double > | |
virtual | ~OneArgumentFunction () |
Provide a virtual destructor for a virtual class. More... | |
Private Member Functions | |
template<class Archive > | |
void | serialize (Archive &ar, const unsigned int) |
Serialize this function. More... | |
Private Attributes | |
SerializableSpline1dInterpolant | __spline |
The interpolating function information necessary to evaluate at any given point. More... | |
double | __min_x |
The smallest abscissa covered by the spline points. More... | |
double | __max_x |
The largest abscissa covered by the spline points. More... | |
Friends | |
class | boost::serialization::access |
Needed for serialization to work. More... | |
Function which interpolates, with possible smoothing, between points.
Definition at line 12 of file InterpolatingFunctionALGLIB.h.
|
inline |
Needed by the Boost serializer.
Definition at line 42 of file InterpolatingFunctionALGLIB.h.
|
inline |
Constuct an interpolating function.
Based on the ALGLIB (smoothing) cubic spline interpolation.
x | The abscissas of tabulated points to fit. |
y | The ordinates of tabulated points to fit. |
yprime | The values of the derivatives to impose on the nodes. |
smoothing | How much smoothing to apply. Omit for no smoothnig, i.e. the interpolating curve passes through all the points). |
degrees_of_freedom | How many degrees of freedom to use for smoothing interpolation. Ignored for non-smoothing interpolation. If omitted it is set to 3 times the number of points being fitted. |
Definition at line 47 of file InterpolatingFunctionALGLIB.h.
Core::InterpolatingFunctionALGLIB::InterpolatingFunctionALGLIB | ( | const double * | x, |
const double * | y, | ||
size_t | num_points, | ||
const double * | yprime = NULL , |
||
double | smoothing = NaN , |
||
int | degrees_of_freedom = -1 |
||
) |
Constuct an interpolating function.
Based on the ALGLIB (smoothing) cubic spline interpolation.
x | The abscissas of tabulated points to fit. |
y | The ordinates of tabulated points to fit. |
num_points | The number of input points. |
yprime | The values of the derivatives to impose on the nodes. |
smoothing | How much smoothing to apply. Omit for no smoothnig, i.e. the interpolating curve passes through all the points). |
degrees_of_freedom | How many degrees of freedom to use for smoothing interpolation. Ignored for non-smoothing interpolation. If omitted it is set to 3 times the number of points being fitted. |
Definition at line 9 of file InterpolatingFunctionALGLIB.cpp.
|
virtual |
Iterator over the abscissas where the function takes the given y value.
Implements Core::OneArgumentFunction< double, double >.
Definition at line 63 of file InterpolatingFunctionALGLIB.cpp.
|
inlinevirtual |
The derivatives of the interpolating function at the given abscissa.
Returns a newly allocated structure, which must be destroyed when no longer needed.
Implements Core::OneArgumentDiffFunction.
Definition at line 121 of file InterpolatingFunctionALGLIB.h.
|
inlinevirtual |
Returns the value of the interpolating function at the given abscissa.
Implements Core::OneArgumentFunction< double, double >.
Definition at line 113 of file InterpolatingFunctionALGLIB.h.
|
inlinevirtual |
The maximum abscissa at which the function is defined.
Implements Core::OneArgumentFunction< double, double >.
Definition at line 129 of file InterpolatingFunctionALGLIB.h.
|
inlinevirtual |
The minimum abscissa at which the function is defined.
Implements Core::OneArgumentFunction< double, double >.
Definition at line 132 of file InterpolatingFunctionALGLIB.h.
|
inlineprivate |
Serialize this function.
Definition at line 22 of file InterpolatingFunctionALGLIB.h.
|
friend |
Needed for serialization to work.
Definition at line 17 of file InterpolatingFunctionALGLIB.h.
|
private |
The largest abscissa covered by the spline points.
Definition at line 36 of file InterpolatingFunctionALGLIB.h.
|
private |
The smallest abscissa covered by the spline points.
Definition at line 36 of file InterpolatingFunctionALGLIB.h.
|
private |
The interpolating function information necessary to evaluate at any given point.
Definition at line 33 of file InterpolatingFunctionALGLIB.h.