Click or drag to resize

OptimizerMultivariableFunctionComputeGradientsNumerically Method

Computes the gradients of an OptimizerMultivariableFunction numerically. This will call the appropriate events on the functions as they are computed.

Namespace:  AGI.Foundation.NumericalMethods
Assembly:  AGI.Foundation.Core (in AGI.Foundation.Core.dll) Version: 24.1.418.0 (24.1.418.0)
Syntax
public static NumericallyComputedOptimizerFunctionDerivativeResults ComputeGradientsNumerically(
	OptimizerMultivariableFunction function,
	double[] variables,
	double[] perturbationValues,
	FiniteDifferenceMethod differenceMethod,
	bool multithreaded,
	OptimizerMultivariableFunctionResults precomputedValueResults,
	ITrackCalculationProgress progressTracker
)

Parameters

function
Type: AGI.Foundation.NumericalMethodsOptimizerMultivariableFunction
The OptimizerMultivariableFunction to compute the gradients for.
variables
Type: SystemDouble
The independent variables that are used to compute the gradients.
perturbationValues
Type: SystemDouble
How much each of the variables should be perturbed while computing the gradients.
differenceMethod
Type: AGI.Foundation.NumericalMethodsFiniteDifferenceMethod
The differencing method to use to numerically compute the derivatives.
multithreaded
Type: SystemBoolean
Should this routine use a multithreaded algorithm. Usually the multithreaded algorithm will be faster, however in cases where there are very few variables and the function evaluates very quickly, it may be faster to set this to false.
precomputedValueResults
Type: AGI.Foundation.NumericalMethodsOptimizerMultivariableFunctionResults
The function results at the variables. This is optional; if this is then the function will be evaluated at the variables.
progressTracker
Type: AGI.FoundationITrackCalculationProgress
An optional progress tracker.

Return Value

Type: NumericallyComputedOptimizerFunctionDerivativeResults
The evaluated gradients of the cost function, equality constraints, and inequality constraints.
See Also