org.omegahat.Numerics.Optimizers
Class BasicDerivativeValues
java.lang.Object
|
+--org.omegahat.Numerics.Optimizers.BasicDerivativeValues
- All Implemented Interfaces:
- DerivativeValues
- public class BasicDerivativeValues
- extends java.lang.Object
- implements DerivativeValues
Represents a particular value of the first and second derivatives
of a function, stored together to facilitate computing them in a single
to avoid repeating computations for each.
Note that this is for storing values of derivatives and not the objects which compute them
(i.e. Gradient and Hessian).
|
Field Summary |
protected double[] |
gradient
The value of the gradient (not the object from which it is computed). |
protected Matrix |
hessian
The value of the second derivative |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
gradient
protected double[] gradient
- The value of the gradient (not the object from which it is computed).
hessian
protected Matrix hessian
- The value of the second derivative
BasicDerivativeValues
public BasicDerivativeValues()
BasicDerivativeValues
public BasicDerivativeValues(double[] gradient)
BasicDerivativeValues
public BasicDerivativeValues(double[] gradient,
Matrix hessian)
gradient
public double[] gradient()
- Access to
gradient field.
- Specified by:
gradient in interface DerivativeValues
gradient
public double[] gradient(double[] g)
- Access to set the
gradient field value.
hessian
public Matrix hessian()
- Access to
hessian field.
- Specified by:
hessian in interface DerivativeValues
hessian
public Matrix hessian(Matrix m)
- Access to set the
hessian field value.