Package org.ddogleg.optimization.math
Interface HessianMath
- All Known Subinterfaces:
HessianBFGS
,HessianLeastSquares<S>
,HessianSchurComplement<S>
- All Known Implementing Classes:
HessianBFGS_DDRM
,HessianLeastSquares_DDRM
,HessianLeastSquares_DSCC
,HessianMath_DDRM
,HessianMath_DSCC
,HessianSchurComplement_Base
,HessianSchurComplement_DDRM
,HessianSchurComplement_DSCC
public interface HessianMath
Abstraction layer for operations related to hessian matrix. This allows different internal representations
of the Hessian matrix to be used by the same code.
-
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
-
Method Details
-
init
void init(int numParameters) Initialize Hessian to be in its initial state with the specified dimensions- Parameters:
numParameters
- Number of optimization parameters. Hessian will be N by N
-
innerVectorHessian
Returns v^T*M*v- Parameters:
v
- vector
-
extractDiagonals
Extracts diagonal elements from the hessian and stores them in the vector diag- Parameters:
diag
- vector
-
setDiagonals
Sets the diagonal elements in the Hessian to the provided vector- Parameters:
diag
- vector
-
divideRowsCols
Applies row and column division using the scaling vector. B = inv(diag(s))*B*inv(diag(s))- Parameters:
scaling
-
-
initializeSolver
boolean initializeSolver()Initializes the solver- Returns:
- true if successful
-
solve
Solves the system step = inv(B)*Y- Parameters:
Y
- (Input) vectorstep
- (output) vector
-