Class HessianMath_DDRM

java.lang.Object
org.ddogleg.optimization.math.HessianMath_DDRM
All Implemented Interfaces:
HessianMath
Direct Known Subclasses:
HessianBFGS_DDRM, HessianLeastSquares_DDRM

public class HessianMath_DDRM extends Object implements HessianMath
Hessian is represented as a dense matrix. Any dense linear solver can be used.
  • Field Details

  • Constructor Details

  • 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 interface HessianMath
      Parameters:
      numParameters - Number of optimization parameters. Hessian will be N by N
    • innerVectorHessian

      public double innerVectorHessian(DMatrixRMaj v)
      Description copied from interface: HessianMath
      Returns v^T*M*v
      Specified by:
      innerVectorHessian in interface HessianMath
      Parameters:
      v - vector
    • extractDiagonals

      public void extractDiagonals(DMatrixRMaj diag)
      Description copied from interface: HessianMath
      Extracts diagonal elements from the hessian and stores them in the vector diag
      Specified by:
      extractDiagonals in interface HessianMath
      Parameters:
      diag - vector
    • setDiagonals

      public void setDiagonals(DMatrixRMaj diag)
      Description copied from interface: HessianMath
      Sets the diagonal elements in the Hessian to the provided vector
      Specified by:
      setDiagonals in interface HessianMath
      Parameters:
      diag - vector
    • divideRowsCols

      public void divideRowsCols(DMatrixRMaj scaling)
      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 interface HessianMath
    • initializeSolver

      public boolean initializeSolver()
      Description copied from interface: HessianMath
      Initializes the solver
      Specified by:
      initializeSolver in interface HessianMath
      Returns:
      true if successful
    • solve

      public boolean solve(DMatrixRMaj Y, DMatrixRMaj step)
      Description copied from interface: HessianMath
      Solves the system step = inv(B)*Y
      Specified by:
      solve in interface HessianMath
      Parameters:
      Y - (Input) vector
      step - (output) vector
    • getHessian

      public DMatrixRMaj getHessian()