FunctionMath.GetNumericalGradient Method

Returns a delegate that numerically evaluates the gradient of a multivariate function.

Definition

Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.3
C#
public static Func<Vector<double>, Vector<double>?, Vector<double>> GetNumericalGradient(
	this Func<Vector<double>, double> function
)

Parameters

function  Func<Vector<Double>, Double>
A delegate that represents a multivariate function.

Return Value

Func<Vector<Double>, Vector<Double>, Vector<Double>>
A delegate that represents a multivariate function returning a vector in its second argument.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type Func<Vector<Double>, Double>. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).

Remarks

Simple forward differences are used to compute the numerical derivatives.

See Also