df?editppspline1d
Modifies parameters representing a spline in a Data Fitting task descriptor.
Syntax
Fortran:

status = dfseditppspline1d(task, s_order, s_type, bc_type, bc, ic_type, ic, scoeff, scoeffhint)
status = dfdeditppspline1d(task, s_order, s_type, bc_type, bc, ic_type, ic, scoeff, scoeffhint)
C:

status = dfsEditPPSpline1D(task, s_order, s_type, bc_type, bc, ic_type, ic, scoeff, scoeffhint)
status = dfdEditPPSpline1D(task, s_order, s_type, bc_type, bc, ic_type, ic, scoeff, scoeffhint)
Input Parameters
Name 
Type 
Description 

task 
Fortran: TYPE(DF_TASK) C: DFTaskPtr 
Descriptor of the task. 
Fortran: INTEGER C: const MKL_INT 
Spline order. The parameter takes one of the values described in table "Spline Orders Supported by Data Fitting Functions". 

Fortran: INTEGER C: const MKL_INT 
Spline type. The parameter takes one of the values described in table "Spline Types Supported by Data Fitting Functions". 

bc_type 
Fortran: INTEGER C: const MKL_INT 
Type of boundary conditions. The parameter takes one of the values described in table "Boundary Conditions Supported by Data Fitting Functions". 
bc 
Fortran: REAL(KIND=4) DIMENSION(*) for dfseditppspline1d REAL(KIND=8) DIMENSION(*) for dfdeditppspline1d C: const float* for dfsEditPPSpline1D const double* for dfdEditPPSpline1D 
Pointer to boundary conditions. The size of the array is defined by the value of parameter bc_type:

ic_type 
Fortran: INTEGER C: const MKL_INT 
Type of internal conditions. The parameter takes one of the values described in table "Internal Conditions Supported by Data Fitting Functions". 
ic 
Fortran: REAL(KIND=4) DIMENSION(*) for dfseditppspline1d REAL(KIND=8) DIMENSION(*) for dfdeditppspline1d C: const float* for dfsEditPPSpline1D const double* for dfdEditPPSpline1D 
A nonNULL pointer to the array of internal conditions. The size of the array is defined by the value of parameter ic_type:

scoeff 
Fortran: REAL(KIND=4) DIMENSION(*) for dfseditppspline1d REAL(KIND=8) DIMENSION(*) for dfdeditppspline1d C: const float* for dfsEditPPSpline1D const double* for dfdEditPPSpline1D 
Spline coefficients. An array of size 
scoeffhint 
Fortran: INTEGER C: const MKL_INT 
A flag describing the structure of the array of spline coefficients. For valid hint values, see table "Hint Values for Spline Coefficients". The library stores the coefficients in rowmajor format. The default value is DF_NO_HINT. 
Output Parameters
Name 
Type 
Description 

status 
Fortran: INTEGER C: int 

Description
The editor modifies parameters that describe the order, type, boundary conditions, internal conditions, and coefficients of a spline. The spline order definition is provided in the "Mathematical Conventions" section. You can set the spline order to any value supported by Data Fitting functions. The table below lists the available values:
Order 
Description 

DF_PP_STD 
Artificial value. Use this value for lookup and stepwise constant interpolants only. 
DF_PP_LINEAR 
Piecewise polynomial spline of the second order (linear spline). 
DF_PP_QUADRATIC 
Piecewise polynomial spline of the third order (quadratic spline). 
DF_PP_CUBIC 
Piecewise polynomial spline of the fourth order (cubic spline). 
To perform computations with a spline not supported by Data Fitting routines, set the parameter defining the spline order and pass the spline coefficients to the library in the supported format. For format description, see figure "Rowmajor Coefficient Storage Format".
The table below lists the supported spline types:
Type 
Description 

DF_PP_DEFAULT 
The default spline type. You can use this type with linear, quadratic, or userdefined splines. 
DF_PP_SUBBOTIN 
Quadratic splines based on Subbotin algorithm, [StechSub76]. 
DF_PP_NATURAL 
Natural cubic spline. 
DF_PP_HERMITE 
Hermite cubic spline. 
DF_PP_BESSEL 
Bessel cubic spline. 
DF_PP_AKIMA 
Akima cubic spline. 
DF_LOOKUP_INTERPOLANT 
Lookup interpolant. 
DF_CR_STEPWISE_CONST_INTERPOLANT 
Continuous right stepwise constant interpolant. 
DF_CL_STEPWISE_CONST_INTERPOLANT 
Continuous left stepwise constant interpolant. 
If you perform computations with lookup or stepwise constant interpolants, set the spline order to the DF_PP_STD value.
Construction of specific splines may require boundary or internal conditions. To compute coefficients of such splines, you should pass boundary or internal conditions to the library by specifying the type of the conditions and providing the necessary values. For splines that do not require additional conditions, such as linear splines, set condition types to DF_NO_BC and DF_NO_IC, and pass NULL pointers to the conditions. The table below defines the supported boundary conditions:
Boundary Condition 
Description 
Spline 

DF_NO_BC 
No boundary conditions provided. 
All 
DF_BC_NOT_A_KNOT 
Notaknot boundary conditions. 
Akima, Bessel, Hermite, natural cubic 
DF_BC_FREE_END 
Freeend boundary conditions. 
Akima, Bessel, Hermite, natural cubic, quadratic Subbotin 
DF_BC_1ST_LEFT_DER 
The first derivative at the left endpoint. 
Akima, Bessel, Hermite, natural cubic, quadratic Subbotin 
DF_BC_1ST_RIGHT_DER 
The first derivative at the right endpoint. 
Akima, Bessel, Hermite, natural cubic, quadratic Subbotin 
DF_BC_2ST_LEFT_DER 
The second derivative at the left endpoint. 
Akima, Bessel, Hermite, natural cubic, quadratic Subbotin 
DF_BC_2ND_RIGHT_DER 
The second derivative at the right endpoint. 
Akima, Bessel, Hermite, natural cubic, quadratic Subbotin 
DF_BC_PERIODIC 
Periodic boundary conditions. 
Linear, all cubic splines 
DF_BC_Q_VAL 
Function value at point (x_{0} + x_{1})/2 
Default quadratic 
Note
To construct a natural cubic spline, pass these settings to the editor:

DF_PP_CUBIC as the spline order,

DF_PP_NATURAL as the spline type, and

DF_BC_FREE_END as the boundary condition.
To construct a cubic spline with other boundary conditions, pass these settings to the editor:

DF_PP_CUBIC as the spline order,

DF_PP_NATURAL as the spline type, and

the required type of boundary condition.
For Akima, Hermite, Bessel and default cubic splines use the corresponding type defined in Table Spline Types Supported by Data Fitting Functions.
You can combine the values of boundary conditions with a bitwise OR
operation. This permits you to pass combinations of first and second derivatives at the endpoints of the interpolation interval into the library. To pass a first derivative at the left endpoint and a second derivative at the right endpoint, set the boundary conditions to DF_BC_1ST_LEFT_DER OR DF_BC_2ND_RIGHT_DER
.
You should pass the combined boundary conditions as an array of two elements. The first entry of the array contains the value of the boundary condition for the left endpoint of the interpolation interval, and the second entry  for the right endpoint. Pass other boundary conditions as arrays of one element.
For the conditions defined as a combination of valid values, the library applies the following rules to identify the boundary condition type:

If not required for spline construction, the value of boundary conditions is ignored.

Notaknot condition has the highest priority. If set, other boundary conditions are ignored.

Freeend condition has the second priority after the notaknot condition. If set, other boundary conditions are ignored.

Periodic boundary condition has the next priority after the freeend condition.

The first derivative has higher priority than the second derivative at the right and left endpoints.
If you set the periodic boundary condition, make sure that function values at the endpoints of the interpolation interval are identical. Otherwise, the library returns an error code. The table below specifies the values to be provided for each type of spline if the periodic boundary condition is set.
Spline Type 
Periodic Boundary Condition Support 
Boundary Value 

Linear 
Yes 
Not required 
Default quadratic 
No 

Subbotin quadratic 
No 

Natural cubic 
Yes 
Not required 
Bessel 
Yes 
Not required 
Akima 
Yes 
Not required 
Hermite cubic 
Yes 
First derivative 
Default cubic 
Yes 
Second derivative 
Internal conditions supported in the Data Fitting domain that you can use for the ic_type parameter are the following:
Internal Condition 
Description 
Spline 

DF_NO_IC 
No internal conditions provided. 

DF_IC_1ST_DER 
Array of first derivatives of size n2, where n is the number of breakpoints. Derivatives are applicable to each coordinate of the vectorvalued function. 
Hermite cubic 
DF_IC_2ND_DER 
Array of second derivatives of size n2, where n is the number of breakpoints. Derivatives are applicable to each coordinate of the vectorvalued function. 
Default cubic 
DF_IC_Q_KNOT 
Knot array of size n+1, where n is the number of breakpoints. 
Subbotin quadratic 
To construct a Subbotin quadratic spline, you have three options to get the array of knots in the library:

If you do not provide the knots, the library uses the default values of knots t = {t_{i}}, i = 0, ..., n according to the rule:
t_{0} = x_{0}, t_{n} = x_{n1}, t_{i} = (x_{i} + x_{i1})/2, i = 1, ..., n  1.

If you provide the knots in an array of size n + 1, the knots form a nonuniform partition. Make sure that the knot values you provide meet the following conditions:
t_{0} = x_{0}, t_{n} = x_{n1}, t_{i} ∈ (x_{i1}, x_{i}), i = 1,..., n  1.

If you provide the knots in an array of size 4, the knots form a uniform partition
t_{0} = x_{0}, t_{1} = l, t_{2} = r, t_{3} = x_{n  1}, where l ∈ (x_{0}, x_{1}) and r ∈ (x_{n  2}, x_{n  1}).
In this case, you need to set the value of the ic_type parameter holding the type of internal conditions to
DF_IC_Q_KNOT OR DF_UNIFORM_PARTITION
.Note
Since the partition is uniform, perform an
OR
operation with the DF_UNIFORM_PARTITION partition hint value described in Table Hint Values for Partition x.
For computations based on lookup and stepwise constant interpolants, you can avoid calling the df?editppspline1d editor and directly call one of the routines for splinebased computation of spline values, derivatives, or integrals. For example, you can call the df?construct1d routine to construct the required spline with the given attributes, such as order or type.
The memory location of the spline coefficients is defined by the scoeff parameter. Make sure that the size of the array is sufficient to hold s_order * (nx1) values.
The df?editppspline1d routine supports the following hint values for spline coefficients:
Order 
Description 

DF_1ST_COORDINATE 
The first coordinate of vectorvalued data is provided. 
DF_NO_HINT 
No hint is provided. By default, all sets of spline coefficients are stored in rowmajor format. 
The coefficients for all coordinates of the vectorvalued function are packed in memory one by one in successive order, from function y_{1} to function y_{ny}.
Within each coordinate, the library stores the coefficients as an array, in rowmajor format:
c_{1, 0}, c_{1, 1}, ..., c_{1, k}, c_{2, 0}, c_{2, 1}, ..., c_{2, k}, ..., c_{n1, 0}, c_{n1, 1}, ..., c_{n1, k}
Mapping of the coefficients to storage in the scoeff array is described below, where c_{i,j} is the jth coefficient of the function
See Mathematical Conventions for more details on nomenclature and interpolants.
If you store splines corresponding to different coordinates of the vectorvalued function at noncontiguous memory locations, do the following:
 Set the scoeffhint flag to DF_1ST_COORDINATE and provide the spline for the first coordinate.
 Pass the spline coefficients for the remaining coordinates into the Data Fitting task using the df?editidxptr task editor.
Using the df?editppspline1d task editor, you can provide to the Data Fitting task an already constructed spline that you want to use in computations. To ensure correct interpretation of the memory content, you should set the following parameters:

Spline order and type, if appropriate. If the spline is not supported by the library, set the s_type parameter to DF_PP_DEFAULT.

Pointer to the array of spline coefficients in rowmajor format.

The scoeffhint parameter describing the structure of the array:

Set the scoeffhint flag to the DF_1ST_COORDINATE value to pass spline coefficients stored at different memory locations. In this case, you can set the parameters that describe boundary and internal conditions to zero.
 Use the default value DF_NO_HINT for all other cases.

Before passing an already constructed spline into the library, you should call the dfieditval task editor to provide the dimension of the spline DF_NY. See table "Parameters Supported by the dfieditval Task Editor" for details.
After you provide the spline to the Data Fitting task, you can run computations that use this spline.
Note
You must preserve the arrays bc (boundary conditions), ic (internal conditions), and scoeff (spline coefficients) through the entire workflow of the Data Fitting computations for a task, as the task stores the addresses of the arrays for splinebased computations.