Interface MinimisationAlgorithm

All Known Implementing Classes:
LeastSquares, MCMC, Simplex

public interface MinimisationAlgorithm
Minimisation algorithm. Designed to be used with MinimisationFunction;
Author:
Jamie Macaulay
  • Field Details

    • PREPARING_ALGORTIHM

      static final int PREPARING_ALGORTIHM
      Preparing the algorithm
      See Also:
    • ALGORITHM_RUNNING

      static final int ALGORITHM_RUNNING
      The algorithm is running
      See Also:
    • ALGORITHM_FINISHED

      static final int ALGORITHM_FINISHED
      The algorithm has finished and a result is present
      See Also:
    • ALGORITHM_FINISHED_ERR

      static final int ALGORITHM_FINISHED_ERR
      The algorithm has finished but no result is present
      See Also:
  • Method Details

    • setMinimisationFunction

      void setMinimisationFunction(MinimisationFunction minFunc)
      Set the minimisation function. This sets up the problem for the algorithm to solve.
      Parameters:
      minFunc - - the minimisation function specific to the problem whihc needs solved
    • runAlgorithm

      boolean runAlgorithm()
      Run the algorithm to find a solution to the set minimisation function. This
      Returns:
      true if the algorithm competed sucessfully.
    • getResult

      double[][] getResult()
      Get the result. There maybe multiple results if ambiguities exist. The number of dimensions is defined in the minimisation function.
      Returns:
      the result
    • getChi2

      double[] getChi2()
      The chi2 value for each result
      Returns:
      the chi2 value for each result.
    • getErrors

      LocaliserError[] getErrors()
      Get the errors. Should be the same number of dimensions as the result. If errors have not been calculated leave as null The number of dimensions is defined in the minimisation function.
      Returns:
      the errors in the result
    • notifyStatus

      void notifyStatus(int status, double progress)
      A progress function which can be used to update different threads.
      Parameters:
      status - - the current status flag.
      progress - - the progress of the algorithm from 0 to 1.0.
    • hasParams

      boolean hasParams()
      A progress function which can be used to update different threads.
      Parameters:
      status - - the current status falg.
      progress - - the progress of the algorithm from 0 to 1.0.
    • getSettingsPane

      LocaliserPane<?> getSettingsPane()
      A settings pane for the algorithm if it has user changeable parameters.
      Returns:
      a settings pane.