Symbolic Math.Get Gradient Method
Returns a delegate that symbolically evaluates the gradient of a multivariate function.
Definition
Namespace: Numerics.NET
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.4
C#
A delegate that represents a multivariate function returning a vector in its second argument.
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.4
public static Func<Vector<double>, Vector<double>?, Vector<double>> GetGradient(
Expression<Func<Vector<double>, double>> function
)
Parameters
- function Expression<Func<Vector<Double>, Double>>
- A lambda expression 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.
Remarks
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.