Interface LineSearch

All Superinterfaces:
IterativeOptimization, Serializable
All Known Implementing Classes:
LineSearchFletcher86, LineSearchMore94

public interface LineSearch extends IterativeOptimization

Line search for nonlinear optimization. Computes function values at different step lengths. all step lengths must be greater than or equal to zero. The derivative at step zero must be less than zero.

  • Method Summary

    Modifier and Type
    Method
    Description
    double
    Function value at the current step
    double
    from wolfe condition.
    double
    Returns the current approximate solution for the line search
    void
    init(double funcAtZero, double derivAtZero, double funcAtInit, double stepInit, double stepMin, double stepMax)
    Initializes and resets the line search.
    void
    setConvergence(double ftol, double gtol)
    Specify convergence criteria for line search
    void
    setFunction(CoupledDerivative function, double fmin)
    Sets the function being optimized.

    Methods inherited from interface org.ddogleg.optimization.IterativeOptimization

    isConverged, isUpdated, iterate, setVerbose
  • Method Details

    • setFunction

      void setFunction(CoupledDerivative function, double fmin)
      Sets the function being optimized.
      Parameters:
      function - Line search function and derivative
      fmin - Minimum possible function value
    • setConvergence

      void setConvergence(double ftol, double gtol)
      Specify convergence criteria for line search
      Parameters:
      ftol - Tolerance for sufficient decrease. ftol > 0. Smaller value for loose tolerance. Try 1e-4
      gtol - Tolerance for curvature condition. gtol ≥ 0. Larger value for loose tolerance. Try 0.9
    • init

      void init(double funcAtZero, double derivAtZero, double funcAtInit, double stepInit, double stepMin, double stepMax)
      Initializes and resets the line search. In some implementations a reasonable minimum and maximum step bound is set here.
      Parameters:
      funcAtZero - Value of f(0)
      derivAtZero - Derivative of at f(0)
      funcAtInit - Value of f at initial value of step: f(step)
      stepInit - Initial step size
      stepMin - Minimum allowed step.
      stepMax - Maximum allowed step.
    • getStep

      double getStep()
      Returns the current approximate solution for the line search
      Returns:
      current solution
    • getFunction

      double getFunction()
      Function value at the current step
    • getGTol

      double getGTol()
      from wolfe condition. Used to estimate max line search step