Package org.ddogleg.optimization.wrap
Class Individual_to_CoupledJacobian<S extends DMatrix>
java.lang.Object
org.ddogleg.optimization.wrap.Individual_to_CoupledJacobian<S>
- All Implemented Interfaces:
CoupledJacobian<S>
,FunctionInOut
public class Individual_to_CoupledJacobian<S extends DMatrix>
extends Object
implements CoupledJacobian<S>
-
Constructor Summary
ConstructorDescriptionIndividual_to_CoupledJacobian
(FunctionNtoM func, FunctionNtoMxN<S> jacobian) -
Method Summary
Modifier and TypeMethodDescriptionvoid
computeFunctions
(double[] output) void
computeJacobian
(S jacobian) Processes the input parameters into the 2D Jacobian matrix.int
Number of input elements.int
Number of output elements.void
setInput
(double[] x) Specifies the input parameters.
-
Constructor Details
-
Individual_to_CoupledJacobian
-
-
Method Details
-
getNumOfInputsN
public int getNumOfInputsN()Description copied from interface:FunctionInOut
Number of input elements. Typically the parameters you are optimizing.- Specified by:
getNumOfInputsN
in interfaceFunctionInOut
- Returns:
- number of input elements
-
getNumOfOutputsM
public int getNumOfOutputsM()Description copied from interface:FunctionInOut
Number of output elements. Typically the functions that are being optimized.- Specified by:
getNumOfOutputsM
in interfaceFunctionInOut
- Returns:
- number of output elements
-
setInput
public void setInput(double[] x) Description copied from interface:CoupledJacobian
Specifies the input parameters. The user can modify these values and they will be modified inside the optimization function too.- Specified by:
setInput
in interfaceCoupledJacobian<S extends DMatrix>
- Parameters:
x
- Optimization parameters.
-
computeFunctions
public void computeFunctions(double[] output) - Specified by:
computeFunctions
in interfaceCoupledJacobian<S extends DMatrix>
-
computeJacobian
Description copied from interface:CoupledJacobian
Processes the input parameters into the 2D Jacobian matrix. The matrix has a dimension of M rows and N columns and is formatted as a row major 1D-array. EJML can be used to provide a matrix wrapper around the output array: DenseMatrix J = DenseMatrix.wrap(m,n,output);
The user can modify the input parameters here and the optimizer must use those changes.
- Specified by:
computeJacobian
in interfaceCoupledJacobian<S extends DMatrix>
- Parameters:
jacobian
- matrix with M rows and N columns.
-