NonLinearFitLM.h

Classes

NonLinearFitLM -- Solve non-linear fit with Levenberg-Marquardt method. (full description)

template<class T> class NonLinearFitLM : public NonLinearFit<T>

Interface

Public Members
explicit NonLinearFitLM(Bool svd=False)
NonLinearFitLM(const NonLinearFitLM &other)
NonLinearFitLM &operator=(const NonLinearFitLM &other)
virtual ~NonLinearFitLM()
Protected Members
virtual Bool fitIt (Vector<typename FunctionTraits<T>::BaseType> &sol, const T<typename FunctionTraits<T>::BaseType> &x, const Vector<typename FunctionTraits<T>::BaseType> &y, const Vector<typename FunctionTraits<T>::BaseType> *const sigma, const Vector<Bool> *const mask=0)

Description

Prerequisite

Etymology

This class uses the Levenberg-Marquardt method to solve the non-linear least-squares fit problem hence NonLinearFitLM

Synopsis

NOTE: Constraints added. Documentation out of date at moment, check the tLinearFitSVD and tNonLinearFirLM programs for examples.

See the NonLinearFit class for a general description.

This class is derived from the general NonLinearFit class. It does a non-linear least-squares fit using the Levenberg-Marquardt method.

See Numerical Recipes for more information on the Levenberg-Marquardt method.

Template Type Argument Requirements (T)

Motivation

Levenberg-Marquardt method is a standard method for non-linear least-squares fits. It works well in practice over a wide range of problems.

Example

Member Description

explicit NonLinearFitLM(Bool svd=False)

Create a fitter: the normal way to generate a fitter object. Necessary data will be deduced from the Functional provided with setFunction(). Optionally, a fitter with SVD behaviour

NonLinearFitLM(const NonLinearFitLM &other)

Copy constructor (deep copy)

NonLinearFitLM &operator=(const NonLinearFitLM &other)

Assignment (deep copy)

virtual ~NonLinearFitLM()

Destructor

virtual Bool fitIt (Vector<typename FunctionTraits<T>::BaseType> &sol, const T<typename FunctionTraits<T>::BaseType> &x, const Vector<typename FunctionTraits<T>::BaseType> &y, const Vector<typename FunctionTraits<T>::BaseType> *const sigma, const Vector<Bool> *const mask=0)

Generalised fitter