Class NumericalJacobianForward_DSCC
java.lang.Object
org.ddogleg.optimization.derivative.NumericalJacobianForward_DSCC
- All Implemented Interfaces:
FunctionInOut,FunctionNtoMxN<DMatrixSparseCSC>
public class NumericalJacobianForward_DSCC
extends Object
implements FunctionNtoMxN<DMatrixSparseCSC>
Finite difference numerical gradient calculation using forward equation. Forward
difference equation, f'(x) = f(x+h)-f(x)/h. Scaling is taken in account by h based
upon the magnitude of the elements in variable x.
NOTE: If multiple input parameters are modified by the function when a single one is changed numerical derivatives aren't reliable.
-
Constructor Summary
ConstructorsConstructorDescriptionNumericalJacobianForward_DSCC(FunctionNtoM function) NumericalJacobianForward_DSCC(FunctionNtoM function, double differenceScale) -
Method Summary
Modifier and TypeMethodDescriptionCreates a matrix which can store the jacobian.intNumber of input elements.intNumber of output elements.voidprocess(double[] input, DMatrixSparseCSC jacobian) Processes the input vector to output a 2D a matrix.voidsetZeroTolerance(double zeroTolerance)
-
Constructor Details
-
NumericalJacobianForward_DSCC
-
NumericalJacobianForward_DSCC
-
-
Method Details
-
getNumOfInputsN
public int getNumOfInputsN()Description copied from interface:FunctionInOutNumber of input elements. Typically, the parameters you are optimizing.- Specified by:
getNumOfInputsNin interfaceFunctionInOut- Returns:
- number of input elements
-
getNumOfOutputsM
public int getNumOfOutputsM()Description copied from interface:FunctionInOutNumber of output elements. Typically, the functions that are being optimized.- Specified by:
getNumOfOutputsMin interfaceFunctionInOut- Returns:
- number of output elements
-
process
Description copied from interface:FunctionNtoMxNProcesses the input vector to output a 2D a matrix. The matrix has a dimension of M rows and N columns and is formatted as a row major 1D-array.
The user can modify the input parameters here and the optimizer must use those changes.
- Specified by:
processin interfaceFunctionNtoMxN<DMatrixSparseCSC>- Parameters:
input- Vector with input parameters.jacobian- Row major array with M rows and N columns.
-
declareMatrixMxN
Description copied from interface:FunctionNtoMxNCreates a matrix which can store the jacobian. Size is set by M and N- Specified by:
declareMatrixMxNin interfaceFunctionNtoMxN<DMatrixSparseCSC>- Returns:
- new instance of a matrix
-
setZeroTolerance
public void setZeroTolerance(double zeroTolerance)
-