Package org.ddogleg.optimization
Interface OptimizationDerivative<State>
public interface OptimizationDerivative<State>
Interface for computing the gradient of a set of functions given a set of model parameters.
Before
computeDerivative(Object, double[][])
is called, the model must be set using
setModel(double[])
.-
Method Summary
Modifier and TypeMethodDescriptionboolean
computeDerivative
(State state, double[][] gradient) Computes the gradient for each function with respect to model parameters.void
setModel
(double[] model) Specifies the current model parameters around which the gradient is computed.
-
Method Details
-
setModel
void setModel(double[] model) Specifies the current model parameters around which the gradient is computed.- Parameters:
model
- Model parameters.
-
computeDerivative
Computes the gradient for each function with respect to model parameters. The derivative is a 2D array. The first axis is for each function and the second for each model parameter:
derivative[i][j] = ∂ fi / ∂ pj- Parameters:
state
- State of the system being examined.gradient
- Gradient with respect to the current model parameters,- Returns:
- true if successful or false if it failed.
-