MtxIntDiff.NumericGradRichardson Method

procedure NumericGradRichardson(Fun: TRealFunction; const Pars: TVec; const Consts: TVec; const ObjConst: TObjectArray; const Grad: TVec);

Numerical gradient by high precision numerical differentiation.

#NameDescription
1FunReal function of several variables.
2ParsFunction variables.
3ConstsArray of additional constants which can be used in math formula.
4ObjConstArray of additional constants (pointers) which can be used in math formula.
5GradReturns calculated gradient. If needed, Grad Length and Complex properties are adjusted automatically.

Result: stored in self (calling object)

Remarks:

Calculates the numerical gradient by high precision numerical differentiation. The algorithm uses Richardson extrapolation of three values of the symmetric difference quotient. The gradient step size is defined by Math387.GradStepSize global variable. Normally the optimal stepsize depends on seventh partial derivatives of the function. Since they are not available, the initial value for GradientStepSize is Exp(Ln(EPS)/7)*0.25, as suggested by Spellucci.

See Also: MtxIntDiff.NumericGradDifference, Optimization.BFGS, Optimization.ConjGrad, TGrad