LTL  2.0.x
Public Member Functions | Static Public Member Functions | Protected Attributes | List of all members
Gaussian< TPAR, TDAT, NPAR, NDIM > Class Template Reference

Approximation of a Gaussian function via Marquardt-Levenberg algorithm. More...

Inherits MRQFunction< TPAR, TDAT, NPAR, NDIM >.

Public Member Functions

void setData (const MArray< TDAT, NDIM > &indata, const TDAT in_nan, const MArray< TDAT, NDIM > &inerror2)
 Set data, error and NaN value. More...
 
void freeData ()
 Free data and error. More...
 
TPAR marquardtCoefficients (const FVector< TPAR, NPAR > &restrict_ parameter, const TPAR chisquare_limit, FMatrix< TPAR, NPAR, NPAR > &restrict_ a, FVector< TPAR, NPAR > &restrict_ b) const
 Calculate actual $\chi^2$ (if better than old one) and Hessematrix. More...
 
size_t getNdof () const
 Return degrees of freedom for fit. More...
 

Static Public Member Functions

static FVector< TPAR, NPAR > partofit (const FVector< TPAR, NPAR > &parameter)
 Convert external fit parameters to internal representation. More...
 
static FVector< TPAR, NPAR > fittopar (const FVector< TPAR, NPAR > &fitpar, const typename FMatrix< TPAR, NPAR, NPAR >::TraceVector &trace)
 Convert internal fit parameters to external representation. More...
 
static FVector< TPAR, NPAR > covtoerr (const typename FMatrix< TPAR, NPAR, NPAR >::TraceVector &trace, const FVector< TPAR, NPAR > &fitpar)
 Calculate external error in parameters from internal covariance matrix. More...
 

Protected Attributes

MArray< TDAT, NDIM > data_
 
TDAT nan_data_
 
MArray< TDAT, NDIM > error2_
 
int ndof_
 

Detailed Description

template<class TPAR, class TDAT, int NPAR, int NDIM>
class Gaussian< TPAR, TDAT, NPAR, NDIM >

Approximation of a Gaussian function via Marquardt-Levenberg algorithm.

Member Function Documentation

template<class TPAR, class TDAT, int NPAR, int NDIM>
void MRQFunction< TPAR, TDAT, NPAR, NDIM >::setData ( const MArray< TDAT, NDIM > &  indata,
const TDAT  in_nan,
const MArray< TDAT, NDIM > &  inerror2 
)
inlineinherited
template<class TPAR, class TDAT, int NPAR, int NDIM>
void MRQFunction< TPAR, TDAT, NPAR, NDIM >::freeData ( )
inlineinherited
template<class TPAR, class TDAT, int NPAR, int NDIM>
static FVector<TPAR, NPAR> MRQFunction< TPAR, TDAT, NPAR, NDIM >::partofit ( const FVector< TPAR, NPAR > &  parameter)
inlinestaticinherited
template<class TPAR, class TDAT, int NPAR, int NDIM>
static FVector<TPAR, NPAR> MRQFunction< TPAR, TDAT, NPAR, NDIM >::fittopar ( const FVector< TPAR, NPAR > &  fitpar,
const typename FMatrix< TPAR, NPAR, NPAR >::TraceVector &  trace 
)
inlinestaticinherited

Convert internal fit parameters to external representation.

Referenced by PolyGaussian< TPAR, TDAT, 7, 2 >::covtoerr(), and PolyGaussian< TPAR, TDAT, 5, 2 >::covtoerr().

template<class TPAR, class TDAT, int NPAR, int NDIM>
static FVector<TPAR, NPAR> MRQFunction< TPAR, TDAT, NPAR, NDIM >::covtoerr ( const typename FMatrix< TPAR, NPAR, NPAR >::TraceVector &  trace,
const FVector< TPAR, NPAR > &  fitpar 
)
inlinestaticinherited

Calculate external error in parameters from internal covariance matrix.

template<class TPAR, class TDAT, int NPAR, int NDIM>
TPAR MRQFunction< TPAR, TDAT, NPAR, NDIM >::marquardtCoefficients ( const FVector< TPAR, NPAR > &restrict_  parameter,
const TPAR  chisquare_limit,
FMatrix< TPAR, NPAR, NPAR > &restrict_  a,
FVector< TPAR, NPAR > &restrict_  b 
) const
inlineinherited

Calculate actual $\chi^2$ (if better than old one) and Hessematrix.

template<class TPAR, class TDAT, int NPAR, int NDIM>
size_t MRQFunction< TPAR, TDAT, NPAR, NDIM >::getNdof ( ) const
inlineinherited

Return degrees of freedom for fit.

Member Data Documentation

template<class TPAR, class TDAT, int NPAR, int NDIM>
MArray<TDAT, NDIM> MRQFunction< TPAR, TDAT, NPAR, NDIM >::data_
protectedinherited
template<class TPAR, class TDAT, int NPAR, int NDIM>
TDAT MRQFunction< TPAR, TDAT, NPAR, NDIM >::nan_data_
protectedinherited
template<class TPAR, class TDAT, int NPAR, int NDIM>
MArray<TDAT, NDIM> MRQFunction< TPAR, TDAT, NPAR, NDIM >::error2_
protectedinherited
template<class TPAR, class TDAT, int NPAR, int NDIM>
int MRQFunction< TPAR, TDAT, NPAR, NDIM >::ndof_
protectedinherited