Package org.ddogleg.optimization.math
Class HessianMath_DSCC
java.lang.Object
org.ddogleg.optimization.math.HessianMath_DSCC
- All Implemented Interfaces:
HessianMath
- Direct Known Subclasses:
HessianLeastSquares_DSCC
Hessian is represented as a sparse compact column matrix.
-
Constructor Summary
ConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptionvoid
divideRowsCols
(DMatrixRMaj scaling) Applies row and column division using the scaling vector.void
extractDiagonals
(DMatrixRMaj diag) Extracts diagonal elements from the hessian and stores them in the vector diagvoid
init
(int numParameters) Initialize Hessian to be in its initial state with the specified dimensionsboolean
Initializes the solverdouble
Returns v^T*M*vvoid
setDiagonals
(DMatrixRMaj diag) Sets the diagonal elements in the Hessian to the provided vectorboolean
solve
(DMatrixRMaj Y, DMatrixRMaj step) Solves the system step = inv(B)*Y
-
Constructor Details
-
HessianMath_DSCC
public HessianMath_DSCC() -
HessianMath_DSCC
-
-
Method Details
-
init
public void init(int numParameters) Description copied from interface:HessianMath
Initialize Hessian to be in its initial state with the specified dimensions- Specified by:
init
in interfaceHessianMath
- Parameters:
numParameters
- Number of optimization parameters. Hessian will be N by N
-
innerVectorHessian
Description copied from interface:HessianMath
Returns v^T*M*v- Specified by:
innerVectorHessian
in interfaceHessianMath
- Parameters:
v
- vector
-
extractDiagonals
Description copied from interface:HessianMath
Extracts diagonal elements from the hessian and stores them in the vector diag- Specified by:
extractDiagonals
in interfaceHessianMath
- Parameters:
diag
- vector
-
setDiagonals
Description copied from interface:HessianMath
Sets the diagonal elements in the Hessian to the provided vector- Specified by:
setDiagonals
in interfaceHessianMath
- Parameters:
diag
- vector
-
divideRowsCols
Description copied from interface:HessianMath
Applies row and column division using the scaling vector. B = inv(diag(s))*B*inv(diag(s))- Specified by:
divideRowsCols
in interfaceHessianMath
-
initializeSolver
public boolean initializeSolver()Description copied from interface:HessianMath
Initializes the solver- Specified by:
initializeSolver
in interfaceHessianMath
- Returns:
- true if successful
-
solve
Description copied from interface:HessianMath
Solves the system step = inv(B)*Y- Specified by:
solve
in interfaceHessianMath
- Parameters:
Y
- (Input) vectorstep
- (output) vector
-