LTL  2.0.x
Public Member Functions | List of all members
ltl::Marquardt< TFUNC, TPAR, TDAT, NPAR, NDIM > Class Template Reference

Marquardt-Levenberg approximation of an arbitrary fitfunction TFUNC. More...

Public Member Functions

 Marquardt (const size_t initer, const TPAR ainstart, const TPAR ainstep, const TPAR ainmin, const TPAR ainmax, const FVector< bool, NPAR > ignin=false)
 Construct class with fit constraints. More...
 
void eval (const MArray< TDAT, NDIM > &restrict_ data, const TDAT nan, const MArray< TDAT, NDIM > &restrict_ error2, const FVector< TPAR, NPAR > &inpar)
 Fit to data and $error^2$ ignoring nan, start with inpar. More...
 
FVector< TPAR, NPAR > getResult ()
 Return result vector. More...
 
TPAR getChiSquare () const
 Return final $\chi^2$. More...
 
size_t getNIteration () const
 Return No needed iterations. More...
 
FVector< TPAR, NPAR > getVariance ()
 Return $error^2$ in fit parameters. More...
 

Detailed Description

template<class TFUNC, class TPAR, class TDAT, int NPAR, int NDIM>
class ltl::Marquardt< TFUNC, TPAR, TDAT, NPAR, NDIM >

Marquardt-Levenberg approximation of an arbitrary fitfunction TFUNC.

Class to fit an arbitrary function TFUNC to arbitrary data (and error).

Constructor & Destructor Documentation

template<class TFUNC , class TPAR , class TDAT , int NPAR, int NDIM>
ltl::Marquardt< TFUNC, TPAR, TDAT, NPAR, NDIM >::Marquardt ( const size_t  initer,
const TPAR  ainstart,
const TPAR  ainstep,
const TPAR  ainmin,
const TPAR  ainmax,
const FVector< bool, NPAR >  ignin = false 
)
inline

Construct class with fit constraints.

Member Function Documentation

template<class TFUNC , class TPAR , class TDAT , int NPAR, int NDIM>
void ltl::Marquardt< TFUNC, TPAR, TDAT, NPAR, NDIM >::eval ( const MArray< TDAT, NDIM > &restrict_  data,
const TDAT  nan,
const MArray< TDAT, NDIM > &restrict_  error2,
const FVector< TPAR, NPAR > &  inpar 
)
inline

Fit to data and $error^2$ ignoring nan, start with inpar.

template<class TFUNC , class TPAR , class TDAT , int NPAR, int NDIM>
FVector<TPAR, NPAR> ltl::Marquardt< TFUNC, TPAR, TDAT, NPAR, NDIM >::getResult ( )
inline

Return result vector.

template<class TFUNC , class TPAR , class TDAT , int NPAR, int NDIM>
TPAR ltl::Marquardt< TFUNC, TPAR, TDAT, NPAR, NDIM >::getChiSquare ( ) const
inline

Return final $\chi^2$.

template<class TFUNC , class TPAR , class TDAT , int NPAR, int NDIM>
size_t ltl::Marquardt< TFUNC, TPAR, TDAT, NPAR, NDIM >::getNIteration ( ) const
inline

Return No needed iterations.

template<class TFUNC , class TPAR , class TDAT , int NPAR, int NDIM>
FVector<TPAR, NPAR> ltl::Marquardt< TFUNC, TPAR, TDAT, NPAR, NDIM >::getVariance ( )
inline

Return $error^2$ in fit parameters.

References ltl::FMatrix< T, M, N >::traceVector().