41class Q_DECL_EXPORT
LMFit :
public QObject
54 LMFit(
const QList<const ArrayItem*>* aList, QList<FunItem*>* fList,
55 const bool* bFit,
double* par, QObject* parent =
nullptr,
56 const double* sigma =
nullptr);
65 static double enorm(
int n,
const double x[]);
72 static double igamc(
double a,
double x);
84 bool linFit(
int n,
int nPar,
double par[],
double resVector[],
double fJac[],
99 void lmdif(
int n,
int nPar,
double par[],
double resVector[],
double tol,
100 int itMax,
int* info,
double fJac[],
int iPvt[]);
108 static int minv(
double a[],
double x[],
int n);
113 inline void setSigma(
const double* sigma) { m_sigma = sigma; };
118 inline void setUserBreak(
bool userBreak =
true) { m_userBreak = userBreak; };
123 void fcn(
int n,
int np,
const double p[],
double fvec[],
int* iflag);
124 void fdjac2(
int m,
int n,
double x[],
const double fvec[],
double fjac[],
125 int ldfjac,
int* iflag,
double epsfcn,
double wa[]);
126 void lmdif(
int m,
int np,
double px[],
double fvec[],
double ftol,
127 double ptol,
double gtol,
int maxfev,
double epsfcn,
128 double diag[],
int mode,
double factor,
int nprint,
129 int* info,
int* nfev,
double fjac[],
int ldfjac,
130 int ipvt[],
double qtf[],
double wa1[],
double wa2[],
131 double wa3[],
double wa4[]);
135 const double* m_sigma;
136 const QList<const ArrayItem*>* m_aList;
137 QList<FunItem*>* m_fList;
Array item class.
Definition arrayitem.h:37
Function item class.
Definition funitem.h:40
Parameter fit class.
Definition lmfit.h:42
void lmdif(int n, int nPar, double par[], double resVector[], double tol, int itMax, int *info, double fJac[], int iPvt[])
Performs nonlinear Levenberg-Marquardt parameter fit.
static double igamc(double a, double x)
Calculates complemented incomplete gamma integral.
LMFit(const QList< const ArrayItem * > *aList, QList< FunItem * > *fList, const bool *bFit, double *par, QObject *parent=nullptr, const double *sigma=nullptr)
Constructor.
bool linFit(int n, int nPar, double par[], double resVector[], double fJac[], int iPvt[])
Performs general linear least square parameter fit.
void updateMessage(const QString &message)
Emitted when a message should be displayed.
void setSigma(const double *sigma)
Sets data error array.
Definition lmfit.h:113
static double enorm(int n, const double x[])
Calculates the euclidean norm of x.
static int minv(double a[], double x[], int n)
Finds the inverse of a square matrix.
void setUserBreak(bool userBreak=true)
Sets condition to stop calculations.
Definition lmfit.h:118
bool userBreak() const
Returns current break condition for calculations.
Definition lmfit.h:120