funct must evaluate the function and its first derivatives at a given point. (e04lb gives you the option of resetting parameters of funct to cause the minimization process to terminate immediately. e04hd will also terminate immediately, without finishing the checking process, if the parameter in question is reset.)

Syntax

C#
public delegate void E04HD_FUNCT(
	ref int iflag,
	int n,
	double[] xc,
	ref double fc,
	double[] gc
)
Visual Basic
Public Delegate Sub E04HD_FUNCT ( _
	ByRef iflag As Integer, _
	n As Integer, _
	xc As Double(), _
	ByRef fc As Double, _
	gc As Double() _
)
Visual C++
public delegate void E04HD_FUNCT(
	int% iflag, 
	int n, 
	array<double>^ xc, 
	double% fc, 
	array<double>^ gc
)
F#
type E04HD_FUNCT = 
    delegate of 
        iflag : int byref * 
        n : int * 
        xc : float[] * 
        fc : float byref * 
        gc : float[] -> unit

Parameters

iflag
Type: System..::..Int32%
On entry: to funct, iflag will be set to 2.
On exit: if you set iflag to some negative number in funct and return control to e04hd, e04hd will terminate immediately with ifail set to your setting of iflag.
n
Type: System..::..Int32
On entry: the number n of variables.
xc
Type: array<System..::..Double>[]()[][]
On entry: the point x at which the function and first derivatives are required.
fc
Type: System..::..Double%
On exit: unless funct resets iflag, fc must be set to the value of the objective function F at the current point x.
gc
Type: array<System..::..Double>[]()[][]
On exit: unless funct resets iflag, gc[j-1] must be set to the value of the first derivative Fxj at the point x, for j=1,2,,n.

See Also