Class SolverLM

java.lang.Object
xal.extension.fit.lsm.SolverLM
All Implemented Interfaces:
FitSolver

public class SolverLM extends Object implements FitSolver
The Levenberg-Marquardt fitting solver.
Author:
shishlo
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Description of the Method
    double
    Gets the lambdaFactor attribute of the SolverLM object
    double
    Gets the lambdaIni attribute of the SolverLM object
    double
    Gets the lambdaMax attribute of the SolverLM object
    double
    Gets the toll attribute of the SolverLM object
    static void
    main(String[] args)
    MAIN for debugging
    void
    setIterLimit(int totalIterLimit)
    Sets the iterLimit attribute of the SolverLM object
    void
    setLambdaFactor(double factor)
    Sets the lambdaFactor attribute of the SolverLM object
    void
    setLambdaIni(double lambdaIni)
    Sets the lambdaIni attribute of the SolverLM object
    void
    setLambdaMax(double lambdaMax)
    Sets the lambdaMax attribute of the SolverLM object
    void
    setToll(double epsToll)
    Sets the toll attribute of the SolverLM object
    boolean
    solve(DataStore ds, ModelFunction mf, double[] iniArr, double[] errIniArr, boolean[] useArr)
    Solve the fitting problem.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • SolverLM

      public SolverLM()
  • Method Details

    • solve

      public boolean solve(DataStore ds, ModelFunction mf, double[] iniArr, double[] errIniArr, boolean[] useArr)
      Solve the fitting problem.
      Specified by:
      solve in interface FitSolver
      Parameters:
      ds - The data for fitting.
      iniArr - The initial values of the parameters.
      errIniArr - The parameter values' errors.
      useArr - The mask Array specifying if the parameter will be used in fitting.
      mf - The model function
      Returns:
      The boolean value specifying success of fitting.
    • setLambdaFactor

      public void setLambdaFactor(double factor)
      Sets the lambdaFactor attribute of the SolverLM object
      Parameters:
      factor - The new lambdaFactor value
    • getLambdaFactor

      public double getLambdaFactor()
      Gets the lambdaFactor attribute of the SolverLM object
      Returns:
      The lambdaFactor value
    • setLambdaIni

      public void setLambdaIni(double lambdaIni)
      Sets the lambdaIni attribute of the SolverLM object
      Parameters:
      lambdaIni - lambdaIni new lambdaIni value
    • getLambdaIni

      public double getLambdaIni()
      Gets the lambdaIni attribute of the SolverLM object
      Returns:
      The lambdaIni value
    • setLambdaMax

      public void setLambdaMax(double lambdaMax)
      Sets the lambdaMax attribute of the SolverLM object
      Parameters:
      lambdaMax - The new lambdaMax value
    • getLambdaMax

      public double getLambdaMax()
      Gets the lambdaMax attribute of the SolverLM object
      Returns:
      The lambdaMax value
    • setToll

      public void setToll(double epsToll)
      Sets the toll attribute of the SolverLM object
      Parameters:
      epsToll - The new toll value
    • getToll

      public double getToll()
      Gets the toll attribute of the SolverLM object
      Returns:
      The toll value
    • setIterLimit

      public void setIterLimit(int totalIterLimit)
      Sets the iterLimit attribute of the SolverLM object
      Parameters:
      totalIterLimit - The new iterLimit value
    • getIterLimit

      public int getIterLimit()
      Description of the Method
      Returns:
      Description of the Return Value
    • main

      public static void main(String[] args)
      MAIN for debugging
      Parameters:
      args - The Array of strings as parameters