Developer Reference for Intel® oneAPI Math Kernel Library for C
?trnlsp_init
Initializes the solver of a nonlinear least squares problem.
Syntax
MKL_INTstrnlsp_init ( _TRNSP_HANDLE_t*handle , constMKL_INT*n , constMKL_INT*m , constfloat*x , constfloat*eps , constMKL_INT*iter1 , constMKL_INT*iter2 , constfloat*rs );
MKL_INTdtrnlsp_init ( _TRNSP_HANDLE_t*handle , constMKL_INT*n , constMKL_INT*m , constdouble*x , constdouble*eps , constMKL_INT*iter1 , constMKL_INT*iter2 , constdouble*rs );
Include Files
mkl.h
Description
The ?trnlsp_init routine initializes the solver.
After initialization, all subsequent invocations of the ?trnlsp_solve routine should use the values of the handle returned by ?trnlsp_init . This handle stores internal data, including pointers to the arrays x and eps . It is important to not move or deallocate these arrays until after calling the ?trnlsp_delete routine.
The eps array contains a number indicating the stopping criteria:
eps Value |
Description |
|---|---|
0 |
Δ < eps(1)[0] |
1 |
||F(x)||_{2} < eps(2)[1] |
2 |
The Jacobian matrix is singular. ||J(x)(1:m,j)[m*(j-1)…m*j-1]||2 :code:` < ` eps(3)[2], j = 1, ..., n |
3 |
||s||_{2} < eps(4)[3] |
4 |
||F(x)||_{2} - ||F(x) - J(x)s||_{2} < eps(5)[4] |
5 |
The trial step precision. If eps(6)[5] = 0, then the trial step meets the required precision ( ≤ 1.0*10 -10 ). |
Note:
J(x) is the Jacobian matrix.
Δ is the trust-region area.
F(x) is the value of the functional.
s is the trial step.
Input Parameters
n
Length of x .
m
Length of F ( x ).
x
Array of size n . Initial guess. A reference to this array is stored in handle for later use and modification by ?trnlsp_solve
.
eps
Array of size 6; contains stopping criteria. See the values in the Description section.
A reference to this array is stored in handle for later use by ?trnlsp_solve
.
iter1
Specifies the maximum number of iterations.
iter2
Specifies the maximum number of iterations of trial step calculation.
rs
Definition of initial size of the trust region (boundary of the trial step). The recommend minimum value is 0.1, and the recommended maximum value is 100.0. Based on your knowledge of the objective function and initial guess you can increase or decrease the initial trust region. It can influence the iteration process, for example, the direction of the iteration process and the number of iterations. If you set rs to 0.0, the solver uses the default value, which is 100.0.
Output Parameters
handle
Type _TRNSP_HANDLE_t .
res
Indicates task completion status.
res = TR_SUCCESS - the routine completed the task normally.
res = TR_INVALID_OPTION - there was an error in the input parameters.
res = TR_OUT_OF_MEMORY - there was a memory error.
TR_SUCCESS , TR_INVALID_OPTION , and TR_OUT_OF_MEMORY are defined in the mkl_rci.fimkl_rci.h include file.