Function gradientR
Calculate the gradient of a function of several variables using Ridders' method.
Real[] gradientR(Real, Func)
(
scope Func f,
Real[] x,
real scale = 1.00000,
Real[] buffer = null
);
This function uses diff()
to calculate the derivative
in each direction. It is therefore more accurate, but slower, than
the gradient()
function. The function f
is typically evaluated
between 6n and 12n times, where n is the length of x
.
See the documentation for diff()
for more information on this method.
This function is used in the same way as gradient()
.