public abstract class NumericalDiffDMultiFunction extends Object implements DiffDMultiFunction
f'(x) = (f(x + h) - f(x)) / h.
Scaling of h is taken into account by each individual h being
based upon the absolute magnitude of the corresponding element in the vector
x.
| Modifier and Type | Field and Description |
|---|---|
protected double |
diffScale
The scaling factor to use for scaling of the individual
h |
| Constructor and Description |
|---|
NumericalDiffDMultiFunction()
Creates a new
NumericalDiffDMultiFunction with a default scaling
factor. |
NumericalDiffDMultiFunction(double diffScale)
Creates a new
NumericalDiffDMultiFunction with the provided
scaling factor. |
| Modifier and Type | Method and Description |
|---|---|
void |
derivativeAt(double[] x,
double[] grad)
The first-derivative vector (a.k.a. gradient) of a double-valued function
over a double[] array evaluated at the input location
x gets
stored into the output vector grad. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitapplyprotected final double diffScale
hpublic NumericalDiffDMultiFunction()
NumericalDiffDMultiFunction with a default scaling
factor.public NumericalDiffDMultiFunction(double diffScale)
NumericalDiffDMultiFunction with the provided
scaling factor.diffScale - scaling factor to use for hpublic final void derivativeAt(double[] x,
double[] grad)
x gets
stored into the output vector grad.derivativeAt in interface Gradientx - a double[] input vector (not modified)grad - a double[] output vector containing the gradient
at location x (modified)Copyright © 2022. All rights reserved.