objfun must evaluate the objective function Fx for a specified n-vector x.

Syntax

C#
public delegate void E05JB_OBJFUN(
	int n,
	double[] x,
	out double f,
	int nstate,
	out int inform
)
Visual Basic
Public Delegate Sub E05JB_OBJFUN ( _
	n As Integer, _
	x As Double(), _
	<OutAttribute> ByRef f As Double, _
	nstate As Integer, _
	<OutAttribute> ByRef inform As Integer _
)
Visual C++
public delegate void E05JB_OBJFUN(
	int n, 
	array<double>^ x, 
	[OutAttribute] double% f, 
	int nstate, 
	[OutAttribute] int% inform
)
F#
type E05JB_OBJFUN = 
    delegate of 
        n : int * 
        x : float[] * 
        f : float byref * 
        nstate : int * 
        inform : int byref -> unit

Parameters

n
Type: System..::..Int32
On entry: n, the number of variables.
x
Type: array<System..::..Double>[]()[][]
On entry: x, the vector at which the objective function is to be evaluated.
f
Type: System..::..Double%
On exit: must be set to the value of the objective function at x, unless you have specified termination of the current problem using inform.
nstate
Type: System..::..Int32
On entry: if nstate=1 then e05jb is calling objfun for the first time. This parameter setting allows you to save computation time if certain data must be read or calculated only once.
inform
Type: System..::..Int32%
On exit: must be set to a value describing the action to be taken by the solver on return from objfun. Specifically, if the value is negative the solution of the current problem will terminate immediately; otherwise, computations will continue.

See Also