#include <AMA.h>
Functions | |
long int | AMA_UnvMonoInterp (AMA_OPTIONS *options, long int n, double *x, double *z, long int degree, AMA_SPLINE **spline) |
Monotonic Interpolation of Univariate Data More... | |
long int AMA_UnvMonoInterp | ( | AMA_OPTIONS * | options, |
long int | n, | ||
double * | x, | ||
double * | z, | ||
long int | degree, | ||
AMA_SPLINE ** | spline | ||
) |
Monotonic Interpolation of Univariate Data
For a given set of data , for , this function employs cnspla to compute the spline
that minimizes
subject to the interpolation constraints
for , and the local monotonicity 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 . The knot vector depends on the independent variable data, the degree and the continuity of the spline at the interior data points. This function computes a spline which satisfies either the full or reduced continuity condition at the interior data points, as well as, the interpolation and local monotonicity constraints. The knot vector is defined by AMA_LamdaMonoInterp().
The following table summarizes the continuity of , for , and the number of coefficients, , for a spline that satisfies the full and reduced continuity conditions.
Degree | Full Continuity | Reduced Continuity | ||
---|---|---|---|---|
Linear | is continuous for | is continuous for | ||
Quadratic | is continuous for | is continuous for | ||
Cubic | is continuous for | is continuous for | ||
Quartic | is continuous for | is continuous for | ||
Quintic | is continuous for | is continuous for |
This function performs the follow tasks:
options | [in] Pointer to AMA_OPTIONS. Must be initialized with AMA_Options() prior to calling AMA_UnvMonoInterp(). |
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 monotonic spline interpolant. Must satisfy spline NULL. |
User Callable Function - Documented 101715