Functions  
long int  AMA_LamdaInterp (AMA_OPTIONS *options, long int n, double *x, long int degree, long int *mlamda, double **lamda) 
Define Approximation and Interpolation Knot Vector More...  
long int  AMA_LamdaMonoInterp (AMA_OPTIONS *options, long int n, double *x, long int degree, enum AMA_Continuity continuity, long int *mlamda, double **lamda) 
Define Monotonic Spline Interpolation Knot Vector. More...  
long int AMA_LamdaInterp  (  AMA_OPTIONS *  options, 
long int  n,  
double *  x,  
long int  degree,  
long int *  mlamda,  
double **  lamda  
) 
Define Approximation and Interpolation Knot Vector
For given independent variable data , for , this function computes a knot vector which insures a spline has sufficient coefficients to satisfy the approximation or interpolation constraints imposed by the univariate and multivariate data approximation and interpolation functions.
The knot vector depends on the degree, , of the spline approximation. If the degree is even, then the knot vector , where , is defined such that its distinct knots are
If the degree is odd, then the knot vector , where , is defined such that its distinct knots are
Regardless of the degree its corresponding knot multiplicity vector is
options  [in] Pointer to AMA_OPTIONS. Must be initialized with AMA_Options() prior to calling AMA_LamdaInterp(). 
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. 
degree  [in] The degree . Must satisfy degree . 
mlamda  [out] The number of knots . Must satisfy mlamda NULL. 
lamda  [out] Pointer to an array of size mlamda containing the knot vector . Must satisfy lamda NULL. 
User Support Function  Documented 110415  !!!THIS IS NOT A USER CALLABLE FUNCTION  DOCUMENT IS INCLUDED FOR COMPLETENESS!!!
long int AMA_LamdaMonoInterp  (  AMA_OPTIONS *  options, 
long int  n,  
double *  x,  
long int  degree,  
enum AMA_Continuity  continuity,  
long int *  mlamda,  
double **  lamda  
) 
Define Monotonic Spline Interpolation Knot Vector.
For given independent variable data , for , this function computes a knot vector which insures a spline has sufficient coefficients to satisfy either the full continuity condition or the reduced continuity condition at the interior data points and also the approximation and local monotinicity constraints. The knot vector provides sufficient conditions to insure a feasible solution for the constraints independent of the variation of the dependent variable data. It depends on the spline's degree, , and the continuity of the spline at the interior data points , for .
If the spline is linear, , then independent of the continuity condition the spline's value is continuous at the interior data points and the knot vector is defined such that its distinct knot and knot multiplicity vectors are
and
The number of spline coefficients is . If , then the knot vector depends on whether the spline satisfies either a full continuity condition or a reduced continuity condition.
If a full continuity condition is requested, then the spline's value and its derivatives , for , are continuous at , for . In this case the knot vector is defined such that its distinct knots are
for and ; and . For example, if the spline is quadratic, , then the distinct knot vector is
and; if if the spline is cubic, , then the distinct knot vector is
Regardless of the degree its corresponding knot multiplicity vector is
and the number of spline coefficients is . This distribution of knots insures the spline has sufficient coefficients to satisfy the full continuity condition at the interior data and to satisfy both the approximation and local monotinicity constraints independent of the variation of the dependent variable data , for .
If a reduced continuity condition is requested, then the knot vector depends on the spline's degree. If the spline is quadratic, , or cubic, , then the knot vector is defined such that its distinct knot and knot multiplicity vectors are
and
The number of spline coefficients is .
If , then for each interval , for , this function defines the knots
for , of multiplicity one and knots of multiplicity two at the interior data points , for , along with knots of multiplicity at the endpoints and . That is, if the spline is quartic, , then and its distinct knot and knot multiplicity vectors are
and
The number of spline coefficients is . However, if the spline is quintic, , then and its distinct knot and knot multiplicity vectors are
and
The number of spline coefficients is . The distribution of knots discussed above insures the spline has sufficient coefficients to satisfy the reduced continuity condition at the interior data and to satisfy both the approximation and local monotinicity constraints independent of the variation of the dependent variable data , for .
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 
options  [in] Pointer to AMA_OPTIONS. Must be initialized with AMA_Options() prior to calling AMA_LamdaMonoInterp(). 
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. 
degree  [in] The degree . Must satisfy degree . 
continuity  [in] Continuity condition flag. It has one of the following two values:

mlamda  [out] The number of knots . Must satisfy mlamda NULL. 
lamda  [out] Pointer to an array of size mlamda containing the knot vector . Must satisfy lamda NULL. 
User Support Function  Documented 110415  !!!THIS IS NOT A USER CALLABLE FUNCTION  DOCUMENT IS INCLUDED FOR COMPLETENESS!!!