?jacobi

Computes the Jacobi matrix of the user's objective function using the central difference.

Syntax

Fortran:

res = sjacobi(fcn, n, m, fjac, x, jac_eps)

res = djacobi(fcn, n, m, fjac, x, jac_eps)

C:

res = sjacobi(fcn, &n, &m, fjac, x, &jac_eps);

res = djacobi(fcn, &n, &m, fjac, x, &jac_eps);

Include Files

The Fortran interfaces are specified in the mkl_rci.fi include file and the C interfaces are specified in the mkl_rci.h include file.

Description

The ?jacobi routine computes the Jacobi matrix for function fcn using the central difference. This routine has a "Black-Box" interface, where the user inputs the objective function via parameters. Note that in this case the user's objective function must have a fixed interface.

See calling and usage examples in FORTRAN and C in the examples\solver\source folder of your Intel MKL directory (ex_nlsqp_f.f, ex_nlsqp_bc_f.f and ex_nlsqp_c.c, ex_nlsqp_bc_c.c, respectively).

Input Parameters

fcn

User-supplied subroutine to evaluate the function that defines the least squares problem. Call fcn (m, n, x, f) with the following parameters:

m - INTEGER. Input parameter. Length of f

n - INTEGER. Input parameter. Length of x.

x -

REAL for sjacobi

DOUBLE PRECISION for djacobi

Input parameter. Array of size n. Vector, at which the function is evaluated. The fcn function should not change this parameter.

f -

REAL for sjacobi

DOUBLE PRECISION for djacobi

Output parameter. Array of size m; contains the function values at x.

Declare fcn as EXTERNAL in the calling program.

n

INTEGER. Length of X.

m

INTEGER. Length of F.

x

REAL for sjacobi

DOUBLE PRECISION for djacobi

Array of size n. Vector at which the function is evaluated.

eps

REAL for sjacobi

DOUBLE PRECISION for djacobi

Precision of the Jacobi matrix calculation.

Output Parameters

fjac

REAL for sjacobi

DOUBLE PRECISION for djacobi

Array of size (m,n). Contains the Jacobi matrix of the function.

res

INTEGER. Informs about the task completion.

res = TR_SUCCESS indicates that the routine has completed the task normally.

res = TR_INVALID_OPTION indicates an error in the input parameters.

res = TR_OUT_OF_MEMORY indicates a memory error.


Submit feedback on this help topic

Copyright © 1994 - 2010, Intel Corporation. All rights reserved.