Computes the value of the gradient of the function at the given point.

Namespace: Imsl.Math
Assembly: ImslCS (in ImslCS.dll) Version: 6.5.0.0

Syntax

C#
void Gradient(
	double[] x,
	int iact,
	double[] result
)
Visual Basic (Declaration)
Sub Gradient ( _
	x As Double(), _
	iact As Integer, _
	result As Double() _
)
Visual C++
void Gradient(
	array<double>^ x, 
	int iact, 
	array<double>^ result
)

Parameters

x
Type: array< System..::.Double >[]()[]
An input double array, the point at which the gradient of the objective function or gradient of a constraint is to be evaluated.
iact
Type: System..::.Int32
An input int value indicating whether evaluation of the objective function gradient is requested or evaluation of a constraint gradient is requested. If iact is zero, then an objective function gradient evaluation is requested. If iact is nonzero then the value of iact indicates the index of the constraint gradient to evaluate. (1 indicates the first constraint, 2 indicates the second, etc.)
result
Type: array< System..::.Double >[]()[]
A double array. If iact is zero, then the value of the objective function gradient at x is returned in result. If iact is nonzero, then the computed gradient of the requested constraint value at the point x is returned in result.

See Also