#include <AMA.h>
Functions | |
long int | AMA_MltvMonoInterp (AMA_OPTIONS *options, long int nind, long int n, double **x, double *z, long int *degree, AMA_SPLINE **spline) |
Monotonic Interpolation of Multivariate Data More... | |
long int AMA_MltvMonoInterp | ( | AMA_OPTIONS * | options, |
long int | nind, | ||
long int | n, | ||
double ** | x, | ||
double * | z, | ||
long int * | degree, | ||
AMA_SPLINE ** | spline | ||
) |
Monotonic Interpolation of Multivariate Data
This function employs cnspla to compute a spline interpolant of independent variable data and dependent variable data
. For a given set of independent variable data
and dependent variable data
, for
, this function computes the spline
that minimizes
subject to the interpolation constraints
for . The integration region
where
and
, for
. This function also imposes constraints on the first order partials
for all
. These constraints are known as the local monotonicity constraints and they are defined by AMA_MltvConreg().
In the above definition of the
, for
and
, are the coefficients of the tensor product B-splines
where are the
univariate B-splines of degree
defined by the knot vector
. The knot vectors
are
and they depend on the independent variable data, the degree and the continuity of the spline at the interior data points. They are based on the rectilinear grid
upon which the independent variable data lies and they are defined by AMA_LamdaMonoInterp(). That is, the knot vector
is defined by AMA_LamdaMonoInterp() based on the points
.
Additionally, the spline is subject to the bounds
where ,
and
equals AMA_SplineInfbnd(). By default the spline is unbounded but finite bounds can be set with AMA_OptionsSetBounds(). If the bounds specified with AMA_OptionsSetBounds() can not be satisfied in conjunction with the aforementioned approximation and local monotonicity constraints, then AMA_MltvMonoApprox() imposes the bounds
where and
. The values of
and
are defined by minimizing
subject to the constraints
and the aforementioned approximation and local monotonicity constraints. If either or
, then AMA_MltvMonoApprox() reports AMA_WARNING_ERROR messages which specify the bounds
and
imposed on the spline. Additionally, it sets AMA_OPTIONS::lwrbnd
and AMA_OPTIONS::uprbnd
.
This function computes a spline which satisfies either the full or reduced continuity condition at the interior grid points, as well as, the interpolation and local monotonicity constraints. The following table summarizes the continuity of with respect to
at the interior grid points
, for
, and the number of coefficients,
, for a spline that satisfies either the full or reduced continuity condition. In the table the term
is the -th order partial of
with respect to
evaluated at
and defined over the region
.
Degree | Full Continuity | ![]() | Reduced Continuity | ![]() |
---|---|---|---|---|
Linear | ![]() ![]() | ![]() | ![]() ![]() | ![]() |
Quadratic | ![]() ![]() | ![]() | ![]() ![]() | ![]() |
Cubic | ![]() ![]() | ![]() | ![]() ![]() | ![]() |
Quartic | ![]() ![]() | ![]() | ![]() ![]() | ![]() |
Quintic | ![]() ![]() | ![]() | ![]() ![]() | ![]() |
This function does the following:
Parameter Note: In the parameter definitions given below the limits on are
and k =
.
options | [in] Pointer to AMA_OPTIONS. Must be initialized with AMA_Options() prior to calling AMA_MltvMonoInterp(). |
nind | [in] The number of independent variables ![]() ![]() ![]() |
n | [in] The number of data points ![]() ![]() |
x | [in] Array of size nind containing arrays of size n where x[k] contains the independent variable data ![]() ![]() |
z | [in] Array of size n containing the dependent variable data ![]() ![]() |
degree | [in] Array of size nind containing the degree ![]() ![]() ![]() ![]() |
spline | [out] Pointer to AMA_SPLINE pointer containing the monotonic spline interpolant. Must satisfy spline ![]() |
User Callable Function - Documented 022416