E04.E04ZC_OBJFUN Delegate
関数リスト一覧   NagLibrary Namespaceへ  ライブラリイントロダクション  本ヘルプドキュメントのchm形式版

objfun must calculate the objective function Fx and its gradient for a specified n-element vector x.

Syntax

C#
public delegate void E04ZC_OBJFUN(
	ref int mode,
	int n,
	double[] x,
	ref double objf,
	double[] objgrd,
	int nstate
)
Visual Basic (Declaration)
Public Delegate Sub E04ZC_OBJFUN ( _
	ByRef mode As Integer, _
	n As Integer, _
	x As Double(), _
	ByRef objf As Double, _
	objgrd As Double(), _
	nstate As Integer _
)
Visual C++
public delegate void E04ZC_OBJFUN(
	int% mode, 
	int n, 
	array<double>^ x, 
	double% objf, 
	array<double>^ objgrd, 
	int nstate
)
F#
type E04ZC_OBJFUN = 
    delegate of 
        mode:int byref * 
        n:int * 
        x:float[] * 
        objf:float byref * 
        objgrd:float[] * 
        nstate:int -> unit

Parameters

mode
Type: System..::.Int32 %
mode is a flag that you may set within objfun to indicate a failure in the evaluation of the objective function.
On entry: is always non-negative.
On exit: if mode is negative on exit from objfun, then execution of e04zc will be terminated with ifail set to mode.
n
Type: System..::.Int32
On entry: the number n of variables as input to e04zc.
x
Type: array< System..::.Double >[]()[]
On entry: the vector x of variables at which the objective function is to be evaluated.
objf
Type: System..::.Double %
On exit: must be set to the value of the objective function.
objgrd
Type: array< System..::.Double >[]()[]
On exit: must contain the gradient vector of the objective function, with objgrd[j-1] containing the partial derivative of F with respect to xj.
nstate
Type: System..::.Int32
On entry: will be 1 on the first call to objfun by e04zc, and is 0 on the two subsequent calls. Thus, if you wish, nstate may be tested in order to perform certain calculations only on the first call of objfun, e.g., read data or initialize global variables. Note that if there are any nonlinear constraints, confun and objfun are called together, in that order.

See Also