MultidimensionalOptimizer.GradientFunction Property

Gets or sets the function that computes the gradient of the objective funciton.

Definition

Namespace: Numerics.NET.Optimization
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.9.0
C#
public Func<Vector<double>, Vector<double>> GradientFunction { get; set; }

Property Value

Func<Vector<Double>, Vector<Double>>
A multivariate function returning a vector.

Remarks

If no gradient callback is supplied, numerical differences are used. Supplied gradients must contain a finite value for every component; otherwise a solve terminates with BadFunction.

Exceptions

InvalidOperationException

The method is called while the algorithm is running.

See Also