Interface IterativeOptimization

All Superinterfaces:
Serializable
All Known Subinterfaces:
LineSearch, UnconstrainedLeastSquares<S>, UnconstrainedLeastSquaresSchur<S>, UnconstrainedMinimization
All Known Implementing Classes:
LineSearchFletcher86, LineSearchMore94, QuasiNewtonBFGS_to_UnconstrainedMinimization, UnconLeastSqLevenbergMarquardt_F64, UnconLeastSqLevenbergMarquardtSchur_F64, UnconLeastSqTrustRegion_F64, UnconLeastSqTrustRegionSchur_F64, UnconMinTrustRegionBFGS_F64

public interface IterativeOptimization
extends Serializable

Interface for iterative optimization classes. One iteration is performed in the search by invoking the iterate() function. When the optimization has terminated iterate() will return true. All implementers of this class must terminate within a finite number of steps. The process can terminate because it has converged or no more progress can be made.

Implementers of this class will provide a function that returns the best set of parameters found so far. This allows the progress to be terminated early if it is taking an excessive amount of time. All implementations are also Serializable, allowing intermediate progress to be saved and resumed.

See Also:
UtilOptimize
  • Method Summary

    Modifier and Type Method Description
    boolean isConverged()
    Indicates if iteration stopped due to convergence or not.
    boolean isUpdated()
    True if the parameter(s) being optimized have been updated
    boolean iterate()
    Updates the search.
    void setVerbose​(@Nullable PrintStream out, int level)
    If set to a non-null output then extra information will be printed to the specified stream.
  • Method Details

    • iterate

      boolean iterate() throws OptimizationException

      Updates the search. If the search has terminated true is returned. After the search has terminated invoke isConverged() to see if a solution has been converged to or if it stopped for some other reason.

      NOTE: The optimization parameters might not be modified after iterate() is called. An internal book keeping step might have been done. To see if parameters have changed call isUpdated().

      Returns:
      true if it has converged or that no more progress can be made.
      Throws:
      OptimizationException
    • isUpdated

      boolean isUpdated()
      True if the parameter(s) being optimized have been updated
      Returns:
      True if parameters have been updated
    • isConverged

      boolean isConverged()
      Indicates if iteration stopped due to convergence or not.
      Returns:
      True if iteration stopped because it converged.
    • setVerbose

      void setVerbose​(@Nullable @Nullable PrintStream out, int level)
      If set to a non-null output then extra information will be printed to the specified stream.
      Parameters:
      out - Stream that is printed to. Set to null to disable
      level - (Future use) Parameter which can be used to specify level of verbose output. Set to zero for now.