Click or drag to resize

UtilCalcGradient Method (ScalarFunction, Double, Double, Double, Double)

Calculates numerically the gradient

Use if fx is already calculated.

Namespace:  DHIMath.Numerics
Assembly:  DHI.Mike1D.Generic (in DHI.Mike1D.Generic.dll) Version: 16.0.0.0 (11.1.1.1111)
Syntax
C#
public static void CalcGradient(
	ScalarFunction function,
	double[] x,
	double fx,
	double[] dfdx,
	double reldx
)

Parameters

function
Type: DHIMath.NumericsScalarFunction
Function to calculate the Jacobian of
x
Type: SystemDouble
Point at which to calculate Jacobian
fx
Type: SystemDouble
Function value at x, f(x)
dfdx
Type: SystemDouble
Jacobian in column major format, must be of size dimx*dimf
reldx
Type: SystemDouble
Relative dx used in numerical gradient calculation
See Also