OptimizerMultivariableFunctionComputeGradientsNumerically Method |
Namespace:
AGI.Foundation.NumericalMethods
Assembly:
AGI.Foundation.Core (in AGI.Foundation.Core.dll) Version: 24.2.419.0 (24.2.419.0)
Syntax public static NumericallyComputedOptimizerFunctionDerivativeResults ComputeGradientsNumerically(
OptimizerMultivariableFunction function,
double[] variables,
double[] perturbationValues,
FiniteDifferenceMethod differenceMethod,
bool multithreaded,
OptimizerMultivariableFunctionResults precomputedValueResults,
ITrackCalculationProgress progressTracker
)
Public Shared Function ComputeGradientsNumerically (
function As OptimizerMultivariableFunction,
variables As Double(),
perturbationValues As Double(),
differenceMethod As FiniteDifferenceMethod,
multithreaded As Boolean,
precomputedValueResults As OptimizerMultivariableFunctionResults,
progressTracker As ITrackCalculationProgress
) As NumericallyComputedOptimizerFunctionDerivativeResults
public:
static NumericallyComputedOptimizerFunctionDerivativeResults^ ComputeGradientsNumerically(
OptimizerMultivariableFunction^ function,
array<double>^ variables,
array<double>^ perturbationValues,
FiniteDifferenceMethod differenceMethod,
bool multithreaded,
OptimizerMultivariableFunctionResults^ precomputedValueResults,
ITrackCalculationProgress^ progressTracker
)
static member ComputeGradientsNumerically :
function : OptimizerMultivariableFunction *
variables : float[] *
perturbationValues : float[] *
differenceMethod : FiniteDifferenceMethod *
multithreaded : bool *
precomputedValueResults : OptimizerMultivariableFunctionResults *
progressTracker : ITrackCalculationProgress -> NumericallyComputedOptimizerFunctionDerivativeResults
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:
NumericallyComputedOptimizerFunctionDerivativeResultsThe evaluated gradients of the cost function, equality constraints, and inequality constraints.
See Also