#include <AMA.h>
Functions | |
long int | AMA_UnvInterp (AMA_OPTIONS *options, long int n, double *x, double *z, long int degree, AMA_SPLINE **spline) |
Interpolation of Univariate Data More... | |
long int AMA_UnvInterp | ( | AMA_OPTIONS * | options, |
long int | n, | ||
double * | x, | ||
double * | z, | ||
long int | degree, | ||
AMA_SPLINE ** | spline | ||
) |
Interpolation of Univariate Data
For a given set of data , for , this function employs cnspla to compute the spline
subject to the interpolation constraints
for .
In the above definition of the , for , are the coefficients of the univariate B-splines of degree which are based on the knot vector . If the degree is even, then the knot vector is defined such that its distinct knot vector is
and; if the degree is odd, then is defined such that its distinct knot vector is
In either case, its corresponding knot multiplicity vector is
and the number of spline coefficients is
Since there are only interpolation constraints and coefficients, it is necessary to define additional conditions in order to insure an unique solution when . Hence, this function imposes boundary conditions on the derivatives of the spline at its left and right hand boundaries. These conditions are for
The following table summarizes the boundary conditions imposed for .
Degree | Boundary Conditions |
---|---|
Quadratic | |
Cubic | |
Quartic | |
Quintic |
This function performs the follow tasks:
options | [in] Pointer to AMA_OPTIONS. Must be initialized with AMA_Options() prior to calling AMA_UnvInterp(). |
n | [in] The number of data points . Must satisfy n . |
x | [in] Array of size n containing the independent variable data , for . Must be in strictly ascending order. |
z | [in] Array of size n containing the dependent variable data , for . |
degree | [in] The degree . Must satisfy degree . |
spline | [out] Pointer to AMA_SPLINE pointer containing the spline interpolant. Must satisfy spline NULL. |
User Callable Function - Documented 101715