Modifies a pointer to the memory representing a coordinate of the data stored in matrix format.
FORTRAN:
status = dfseditidxptr(task, type, idx, ptr)
status = dfdeditidxptr(task, type, idx, ptr)
C:
status = dfsEditIdxPtr(task, type, idx, ptr)
status = dfdEditIdxPtr(task, type, idx, ptr)
Name |
Type |
Description |
---|---|---|
task |
Fortran: TYPE(DF_TASK) C: DFTaskPtr |
Descriptor of the task. |
Fortran: INTEGER C: MKL_INT |
Type of the data to be modified. The parameter takes one of the values described in "Data Attributes Supported by the df?editidxptr Task Editor". |
|
idx |
Fortran: INTEGER C: MKL_INT |
Index of the coordinate whose pointer is to be modified. |
ptr |
Fortran: REAL(KIND=4) DIMENSION(*) for dfseditidxptr REAL(KIND=8) DIMENSION(*) for dfdeditidxptr C: float* for dfsEditIdxPtr double* for dfdEditIdxPtr |
Pointer to the data that holds values of coordinate idx. For details, see table "Data Attributes Supported by the df?editidxptr Task Editor". |
Name |
Type |
Description |
---|---|---|
status |
Fortran: INTEGER C: int |
Status of the routine:
|
The routine modifies a pointer to the array that holds the idx coordinate of vector-valued function y or the pointer to the array of spline coefficients corresponding to the given coordinate.
You can use the editor if you need to pass into a Data Fitting task or modify the pointer to coordinates of the vector-valued function or spline coefficients held at non-contiguous memory locations.
Before calling this editor, make sure that you have created and initialized the task using a task creation function or a relevant editor such as the generic or specific df?editppspline1d editor.
Data Attribute |
Description |
---|---|
DF_Y |
Vector-valued function y |
DF_PP_SCOEFF |
Piecewise polynomial spline coefficients |
When using df?editidxptr, you might receive an error code in the following cases:
You passed an unsupported parameter value into the editor.
The value of the index exceeds the predefined value that equals the dimension ny of the vector-valued function.
You pass a NULL pointer to the editor. In this case, the task remains unchanged.
The code example below demonstrates how to use the editor for providing values of a vector-valued function stored in two non-contiguous arrays:
#define NX 1000 /* number of break points */ #define NY 2 /* dimension of vector-valued function */ int main() { DFTaskPtr task; double x[NX]; double y1[NX], y2[NX]; /* vector-valued function is stored as two arrays */ /* Provide first coordinate of two-dimensional function y into creation routine */ status = dfdNewTask1D( &task, NX, x, DF_NON_UNIFORM_PARTITION, NY, y1, DF_1ST_COORDINATE ); /* Provide second coordiante of two–dimensional function */ status = dfdEditIdxPtr(task, DF_Y, 1, y2 ); ... }