SymbolicMath.GetFunctionAndGradient Method

Returns a delegate that symbolically evaluates the gradient and returns the value of a multivariate function.

DefinitionPermalink

Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.1.0
C#
public static Func<Vector<double>, Vector<double>, double> GetFunctionAndGradient(
	Expression<Func<Vector<double>, double>> function
)

ParametersPermalink

function  Expression<Func<Vector<Double>, Double>>
A lambda expression that represents a multivariate function.

Return ValuePermalink

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

RemarksPermalink

The partial derivatives are calculated symbolically from the supplied lambda expression. The expression must not contain loops or blocks. If functions are encountered for which no symbolic derivative is available, a numerical approximation is used.

See AlsoPermalink