#include <AMA.h>
Functions | |
long int | AMA_MltvBoundaryConditions (AMA_OPTIONS *options, enum AMA_Boolean interp, CNSPLA_SPLFUN *splfun) |
Define boundary conditions for multivariate approximation and interpolation functions. More... | |
long int | AMA_MltvData (AMA_OPTIONS *options, const char *datfile, long int *nind, long int *degree, long int *n, double ***x, double **z, double **epsilon, double **wht, double *theta, long int *mlamda, double ***lamda) |
Read data and approximation options for AMA Spline Library Multivariate Random Data Functions. More... | |
long int | AMA_MltvDataFree (AMA_OPTIONS *options, long int nind, double ***x, double **z, double **epsilon, double **wht, double ***lamda) |
Free Multivariate Data Functions data arrays. More... | |
long int | AMA_MltvGrdData (AMA_OPTIONS *options, const char *datfile, long int *nind, long int *degree, long int *ng, double ***x, double **z, double **epsilon, double **wht, double *theta, long int *mlamda, double ***lamda) |
Read data and approximation options for AMA Spline Library Multivariate Gridded Data Functions. More... | |
long int | AMA_MltvGrdInputCheck (AMA_OPTIONS *options, long int nind, long int *ng, double **x, double *z, double *wht, double *epsilon, long int *degree, long int *mlamda, double **lamda, enum AMA_Boolean lstsqr, enum AMA_Boolean *mltknt) |
Perform input check for multivariate gridded data. More... | |
long int | AMA_MltvInputCheck (AMA_OPTIONS *options, long int nind, long int n, double **x, double *z, double *wht, double *epsilon, long int *degree, long int *mlamda, double **lamda, enum AMA_Boolean lstsqr) |
Perform input check for multivariate data approximation functions. More... | |
long int | AMA_MltvPnltrm (AMA_OPTIONS *options, double theta, long int porder, CNSPLA_SPLFUN *splfun) |
Define penalty term on a multivariate spline. More... | |
long int | AMA_MltvConpnt (AMA_OPTIONS *options, long int nind, long int n, double **x, double *z, double *epsilon, CNSPLA_SPLFUN *splfun) |
Define approximation or interpolation constraints on a multivariate spline. More... | |
long int | AMA_MltvConreg (AMA_OPTIONS *options, long int nind, long int n, double **x, double *z, double *epsilon, long int *degree, CNSPLA_SPLFUN *splfun) |
Define monotonicity constraints on a multivariate spline. More... | |
long int AMA_MltvBoundaryConditions | ( | AMA_OPTIONS * | options, |
enum AMA_Boolean | interp, | ||
CNSPLA_SPLFUN * | splfun | ||
) |
Define boundary conditions for multivariate approximation and interpolation functions.
options | [in] Pointer to AMA_OPTIONS. Should be initialized with AMA_Options() prior to calling AMA_MltvBoundaryConditions(). |
interp | [in] Interpolation function flag. It has one of the following two values:
|
splfun | [in] Pointer to CNSPLA_SPLFUN containing the spline ![]() ![]() |
User Support Function - Documented nnnnnn - !!!THIS IS NOT A USER CALLABLE FUNCTION - DOCUMENT IS INCLUDED FOR COMPLETENESS!!!
long int AMA_MltvConpnt | ( | AMA_OPTIONS * | options, |
long int | nind, | ||
long int | n, | ||
double ** | x, | ||
double * | z, | ||
double * | epsilon, | ||
CNSPLA_SPLFUN * | splfun | ||
) |
Define approximation or interpolation constraints on a multivariate spline.
For a given set of independent variable data , dependent variable data
and approximation tolerances
, for
, this function defines either the approximation constraints
or the interpolation constraints
for , on a multivariate spline
given as
Parameter Note: In the parameter definitions given below the limits on are
and k =
.
options | [in] Pointer to AMA_OPTIONS. Should be initialized with AMA_Options() prior to calling AMA_MltvConpnt(). |
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 ![]() ![]() |
epsilon | [in] Array of size n containing the approximation tolerances ![]() ![]() ![]() ![]() |
splfun | [in] Pointer to CNSPLA_SPLFUN containing spline ![]() ![]() |
User Support Function - Documented 110914 - !!!THIS IS NOT A USER CALLABLE FUNCTION - DOCUMENT IS INCLUDED FOR COMPLETENESS!!!
long int AMA_MltvConreg | ( | AMA_OPTIONS * | options, |
long int | nind, | ||
long int | n, | ||
double ** | x, | ||
double * | z, | ||
double * | epsilon, | ||
long int * | degree, | ||
CNSPLA_SPLFUN * | splfun | ||
) |
Define monotonicity constraints on a multivariate spline.
For a given set of independent variable data , dependent variable data
and approximation tolerances
, for
, this function defines local monotonicity constraints on a multivariate spline
given as
This function first defines the rectilinear grid upon which the independent variable data lies and then it defines the gridded dependent variable data
and the gridded approximation tolerances
for
and
. If the independent variable data defines a gridded data distribution, then
. If it defines a gridded data with holes distribution, then
; that is, dependent variable data does not lie everywhere on the grid. In the latter case the local monotonicity constraints are not defined in regions of missing data.
After determining the data's underlying rectilinear grid this function imposes constraints on the first order partials , for all
, which insure the spline satisfies the local monotonicity constraints. The form of the constraints depends on the approximation tolerances.
If , then for some
a local monotonicity constraint is defined for all
with
and it is of the form
The above constraint is defined for all . The notation
and
refers to the dependent variable data associated with the grid points
and
, respectively. If data does not lie at both grid points, then the constraint is not defined.
Alternatively, if there exists an for which
, then for some
a local monotonicity constraint is defined for all
with
and it is of the form
The above constraint is defined for all . The notation
and
refers to the approximation tolerances associated with the grid points
and
, respectively. If data does not lie at both grid points, then the constraint is not defined.
If for some the above conditions are not met, then the intervals
and
intersect and the equality constraint
can be imposed over the interval . However, it is possible for the intervals
and
to intersect, for each
and
; without an intersection existing between all the intervals. In this case the aforementioned equality constraint is inconsistent with the approximation constraints
for ; and, therefore, can not be imposed over the interval
. Hence, instead of imposing an equality constraint this function minimizes
over all intervals for which the intervals
and
intersect.
Parameter Note: In the parameter definitions given below the limits on are
and k =
.
options | [in] Pointer to AMA_OPTIONS. Should be initialized with AMA_Options() prior to calling AMA_MltvConreg(). |
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 ![]() ![]() |
epsilon | [in] Array of size n containing the approximation tolerances ![]() ![]() ![]() ![]() ![]() ![]() |
degree | [in] Array of size nind containing the degree ![]() ![]() ![]() ![]() |
splfun | [in] Pointer to CNSPLA_SPLFUN containing spline ![]() ![]() |
User Support Function - Documented 121114 - !!!THIS IS NOT A USER CALLABLE FUNCTION - DOCUMENT IS INCLUDED FOR COMPLETENESS!!!
long int AMA_MltvData | ( | AMA_OPTIONS * | options, |
const char * | datfile, | ||
long int * | nind, | ||
long int * | degree, | ||
long int * | n, | ||
double *** | x, | ||
double ** | z, | ||
double ** | epsilon, | ||
double ** | wht, | ||
double * | theta, | ||
long int * | mlamda, | ||
double *** | lamda | ||
) |
Read data and approximation options for AMA Spline Library Multivariate Random Data Functions.
This function reads data and approximation options for AMA Spline Library functions which compute spline approximations of independent variable data and dependent variable data
.
The argument datfile should reference a readable file which consists of a data section and several, optional, approximation options sections. The Data section must preceed the approximation options sections and has the following structure:
where the Epsilon and Wht columns are optional. The data must satisfy the following conditions:
Following the Data section may be one or more of the Bounds, Least_Squares, Monotonicity or Penalty_Term sections. If an approximation options section is not defined, then this function sets the options to their default values. See Table Approximation Options Defaults for a list of Multivariate Random Data Functions approximation options default values.
The Bounds section specifies the lower and upper bounds. It has the following structure:
and its options must satisfy the following conditions:
The lower bound is read as a string lwrstr and based on the value of lwrstr the value of is set as follows:
Similarly, the upper bound is read as a string uprstr and based on the value of uprstr the value of is set as follows:
The Least_Squares section specifies the approximation options and knots employed by AMA_MltvLstsqr(). It has the following structure:
and its options must satisfy the following conditions:
The Monotonicity section specifies the monotonicity constraints and continuity conditions employed by AMA_MltvMonoApprox() and AMA_MltvMonoInterp(). It has the the following structure:
and its options must satisfy the following conditions:
The Penalty_Term section specifies which cross partial terms are used in the penalty term. It has the following structure:
and its options must satisfy the following condition:
The bold keywords are case sensitive and the string values for the approximation options are case insensitive.
This function performs the following tasks:
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_MltvData(). |
datfile | [in] The data file name. Must satisfy datfile ![]() |
nind | [out] The number of independent variables ![]() ![]() |
degree | [out] Array of size nind containing the degree ![]() ![]() ![]() |
n | [out] The number of data points ![]() ![]() |
x | [out] Array of size nind containing arrays of size n where x[k] contains the independent variable data ![]() ![]() ![]() |
z | [out] Array of size n containing the dependent variable data ![]() ![]() ![]() |
epsilon | [out] Array of size n containing the approximation tolerances ![]() ![]() ![]() |
wht | [out] Array of size n containing the weights ![]() ![]() ![]() |
theta | [out] The penalty term weight ![]() ![]() |
mlamda | [out] Array of size nind containing the number of knots ![]() ![]() ![]() |
lamda | [out] Array of size nind containing arrays of size mlamda[k] where lamda[k] contains the knots ![]() ![]() ![]() |
User Support Function - Documented 110315 - !!!THIS IS NOT A USER CALLABLE FUNCTION - DOCUMENT IS INCLUDED FOR COMPLETENESS!!!
long int AMA_MltvDataFree | ( | AMA_OPTIONS * | options, |
long int | nind, | ||
double *** | x, | ||
double ** | z, | ||
double ** | epsilon, | ||
double ** | wht, | ||
double *** | lamda | ||
) |
Free Multivariate Data Functions data arrays.
This function frees the arrays allocated by AMA_MltvData() and AMA_MltvGrdData().
options | [in] Pointer to AMA_OPTIONS. Must be initialized with AMA_Options() prior to calling AMA_MltvDataFree(). |
nind | [out] The number of independent variables ![]() ![]() |
x | [out] Pointer to array of size nind containing the independent variable data arrays. |
z | [out] Pointer to array containing the dependent variable data. |
epsilon | [out] Pointer to array containing the approximation tolerances. |
wht | [out] Pointer to array containing the weights. |
lamda | [out] Pointer to array of size nind containing the knot arrays. |
User Support Function - Documented 110515 - !!!THIS IS NOT A USER CALLABLE FUNCTION - DOCUMENT IS INCLUDED FOR COMPLETENESS!!!
long int AMA_MltvGrdData | ( | AMA_OPTIONS * | options, |
const char * | datfile, | ||
long int * | nind, | ||
long int * | degree, | ||
long int * | ng, | ||
double *** | x, | ||
double ** | z, | ||
double ** | epsilon, | ||
double ** | wht, | ||
double * | theta, | ||
long int * | mlamda, | ||
double *** | lamda | ||
) |
Read data and approximation options for AMA Spline Library Multivariate Gridded Data Functions.
This function reads data for AMA Spline Library functions which compute spline approximations of independent variable data and dependent variable data
. The independent variable data defines the rectilinear grid
where and
. The dependent variable data lies on the grid and is given as
for
; that is, there are
dependent variable values. Similarly, the approximation tolerances
for
lie on the grid.
The argument datfile should reference a readable file which consists of a data section and several, optional, approximation options sections. The Data section must preceed the approximation options sections and has the following structure:
where the Epsilon and Wht columns are optional. The data must satisfy the following conditions:
Following the Data section may be one or more of the Bounds, Least_Squares or Monotonicity sections. If an approximation options section is not defined, then this function sets the options to their default values. See Table Approximation Options Defaults for a list of Multivariate Gridded Data Functions approximation options default values.
The Bounds section specifies the lower and upper bounds employed by AMA_MltvGrdLstsqr(). It has the following structure:
and its options must satisfy the following conditions:
The lower bound is read as a string lwrstr and based on the value of lwrstr the value of is set as follows:
Similarly, the upper bound is read as a string uprstr and based on the value of uprstr the value of is set as follows:
The Least_Squares section specifies the approximation options and knots employed by AMA_MltvGrdLstsqr(). It has the following structure:
and its options must satisfy the following conditions:
The Monotonicity section specifies the monotonicity constraints and continuity conditions employed by AMA_MltvGrdMonoApprox() and AMA_MltvGrdMonoInterp(). It has the the following structure:
and its options must satisfy the following conditions:
The bold keywords are case sensitive and the string values for the approximation options are case insensitive.
This function performs the following tasks:
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_MltvGrdData(). |
datfile | [in] The data file name. Must satisfy datfile ![]() |
nind | [out] The number of independent variables ![]() ![]() |
degree | [out] Array of size nind containing the degree ![]() ![]() ![]() |
ng | [out] Array of size nind containing the number of points ![]() ![]() ![]() |
x | [out] Array of size nind containing arrays of size ng[k] where x[k] contains the independent variable data ![]() ![]() ![]() |
z | [out] Array of size ![]() ![]() ![]() ![]() |
epsilon | [out] Array of size ![]() ![]() ![]() ![]() |
wht | [out] Array of size ![]() ![]() ![]() ![]() |
theta | [out] The penalty term weight ![]() ![]() |
mlamda | [out] Array of size nind containing the number of knots ![]() ![]() ![]() |
lamda | [out] Array of size nind containing arrays of size mlamda[k] where lamda[k] contains the knots ![]() ![]() ![]() |
User Support Function - Documented 110315 - !!!THIS IS NOT A USER CALLABLE FUNCTION - DOCUMENT IS INCLUDED FOR COMPLETENESS!!!
long int AMA_MltvGrdInputCheck | ( | AMA_OPTIONS * | options, |
long int | nind, | ||
long int * | ng, | ||
double ** | x, | ||
double * | z, | ||
double * | wht, | ||
double * | epsilon, | ||
long int * | degree, | ||
long int * | mlamda, | ||
double ** | lamda, | ||
enum AMA_Boolean | lstsqr, | ||
enum AMA_Boolean * | mltknt | ||
) |
Perform input check for multivariate gridded data.
This function checks the input parameters for the Multivariate Gridded Data Functions which compute the spline
of degree which is based on the knot vectors
, for
.
Along with the degree the Multivariate Gridded Data Functions require the independent variable data , for
and
, which defines the rectilinear grid
and either the weights or the approximation tolerances
, for
. There are a total of N
points. Also, for least squares approximation functions the knot vectors
, for
, are required. This function insures the following conditions are satisfied:
Also, if lstsqr equals AMA_Boolean_True and the knot vector is represented by its distinct knot vector
and its knot multiplicity vector
then, for all , this function insures either the conditions
or
are satisfied. It also insures the first and last distinct knots satisfy the conditions and
, respectively.
Parameter Note: In the parameter definitions given below the limits on are
, k =
and N
.
options | [in] Pointer to AMA_OPTIONS. Must be initialized with AMA_Options() prior to calling AMA_MltvGrdInputCheck(). |
nind | [in] The number of independent variables ![]() ![]() |
ng | [in] Array of size nind containing the number of points ![]() ![]() ![]() ![]() |
x | [in] Array of size nind containing arrays of size ng[k] where x[k] contains the independent variable data ![]() ![]() ![]() ![]() |
z | [in] Array of size N containing the dependent variable data ![]() ![]() ![]() |
wht | [in] Array of size N containing the weights ![]() ![]() ![]() ![]() ![]() |
epsilon | [in] Array of size N containing the approximation tolerances ![]() ![]() ![]() ![]() ![]() |
degree | [in] Array of size nind containing the degree ![]() ![]() ![]() ![]() ![]() |
mlamda | [in] Array of size nind containing the number of knots ![]() ![]() ![]() ![]() |
lamda | [in] Array of size nind containing arrays of size mlamda[k] where lamda[k] contains the knot vector ![]() ![]() ![]() |
lstsqr | [in] Least squares approximation flag. If it equals AMA_Boolean_True, then this function is being called by a least squares approximation function. |
mltknt | [out] Array of size nind containing the multiple knot flag. Defined only if lstsqr equals AMA_Boolean_True. It has one of the following two values:
|
User Support Function - Documented 021116 - !!!THIS IS NOT A USER CALLABLE FUNCTION - DOCUMENT IS INCLUDED FOR COMPLETENESS!!!
long int AMA_MltvInputCheck | ( | AMA_OPTIONS * | options, |
long int | nind, | ||
long int | n, | ||
double ** | x, | ||
double * | z, | ||
double * | wht, | ||
double * | epsilon, | ||
long int * | degree, | ||
long int * | mlamda, | ||
double ** | lamda, | ||
enum AMA_Boolean | lstsqr | ||
) |
Perform input check for multivariate data approximation functions.
This function checks the input parameters for the Multivariate Random Data Functions which compute the spline
of degree which is based on the knot vectors
, for
. Along with the degree the Multivariate Random Data Functions require the independent variable data data
, for
, and either the weights
or the approximation tolerances
, for
. Also, for least squares approximation functions the knot vectors
, for
, are required. This function insures the following conditions are satisfied:
Also, if lstsqr equals AMA_Boolean_True and the knot vector is represented by its distinct knot vector
and its knot multiplicity vector
then, for all , this function insures either the conditions
or
are satisfied. It also insures the first and last distinct knots satisfy the conditions and
, respectively.
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_MltvInputCheck(). |
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 ![]() ![]() ![]() |
wht | [in] Array of size n containing the weights ![]() ![]() ![]() ![]() ![]() |
epsilon | [in] Array of size n containing the approximation tolerances ![]() ![]() ![]() ![]() ![]() |
degree | [in] Array of size nind containing the degree ![]() ![]() ![]() ![]() ![]() |
mlamda | [in] Array of size nind containing the number of knots ![]() ![]() ![]() ![]() |
lamda | [in] Array of size nind containing arrays of size mlamda[k] where lamda[k] contains the knot vector ![]() ![]() ![]() |
lstsqr | [in] Least squares approximation flag. If it equals AMA_Boolean_True, then this function is being called by a least squares approximation function. |
User Support Function - Documented 021116 - !!!THIS IS NOT A USER CALLABLE FUNCTION - DOCUMENT IS INCLUDED FOR COMPLETENESS!!!
long int AMA_MltvPnltrm | ( | AMA_OPTIONS * | options, |
double | theta, | ||
long int | porder, | ||
CNSPLA_SPLFUN * | splfun | ||
) |
Define penalty term on a multivariate spline.
This function defines a penalty term for
or
on a multivariate spline
given as
where the s, for
and
, are the coefficients of the tensor product B-splines
The s are the
univariate B-splines of degree
defined by the knot vectors
For the penalty term
is
where . Alternately, for
the penalty term
is
The cross partial terms can be excluded from the penalty term with AMA_OptionsSetPenaltyTerm().
options | [in] Pointer to AMA_OPTIONS. Should be initialized with AMA_Options() prior to calling AMA_MltvPnltrm(). |
theta | [in] The penalty term weight ![]() ![]() ![]() |
porder | [in] The penalty term order ![]() ![]() ![]() |
splfun | [in] Pointer to CNSPLA_SPLFUN containing spline ![]() ![]() |
User Support Function - Documented 121114 - !!!THIS IS NOT A USER CALLABLE FUNCTION - DOCUMENT IS INCLUDED FOR COMPLETENESS!!!