NonLinearLSQ Computes a fit using a Levenberg-Marquardt algorithm.
More...
#include <NonLinearLSQ.h>
|
virtual | ~NonLinearLSQ () |
| Destructor.
|
|
virtual int | nSize () const =0 |
|
virtual int | nParms () const =0 |
|
void | setMaxIters (int m) |
| Sets the maximum number of iterations.
|
|
int | maxIters () const |
| Maximum number iterations for valid solution.
|
|
virtual NLVector | guess ()=0 |
|
virtual NLVector | f_x (const NLVector &x)=0 |
|
virtual NLMatrix | df_x (const NLVector &x)=0 |
|
virtual double | absErr () const |
|
virtual double | relErr () const |
|
int | curvefit () |
|
int | status () const |
| Return status of last fit processing.
|
|
bool | success () const |
| Determine success from last fit processing.
|
|
bool | success (int status) const |
| Check status for success of the given condition
|
|
std::string | statusstr () const |
| Return error message pertaining to last fit procesing.
|
|
std::string | statusstr (int status) const |
| Return error message given status condition.
|
|
virtual int | checkIteration (const int Iter, const NLVector &fitcoefs, const NLVector &uncerts, double cplxconj, int Istatus) |
| Default interation test simply returns input status.
|
|
NLVector | coefs () const |
| Return coefficients from last fit processing.
|
|
NLVector | uncert () const |
| Return uncertainties from last fit processing.
|
|
int | nIterations () const |
| Return number of iterations from last fit processing.
|
|
|
NLVector | gslToNlsq (const gsl_vector *v) const |
|
NLMatrix | gslToNlsq (const gsl_matrix *m) const |
|
gsl_vector * | NlsqTogsl (const NLVector &v, gsl_vector *gv=0) const |
|
gsl_matrix * | NlsqTogsl (const NLMatrix &m, gsl_matrix *gm=0) const |
|
NLVector | getUncertainty (const gsl_matrix *m) const |
|
|
static int | f (const gsl_vector *x, void *params, gsl_vector *fx) |
|
static int | df (const gsl_vector *x, void *params, gsl_matrix *J) |
|
static int | fdf (const gsl_vector *x, void *params, gsl_vector *fx, gsl_matrix *J) |
|
NonLinearLSQ Computes a fit using a Levenberg-Marquardt algorithm.
This virtual base class uses the GSL toolkit to apply the Levenberg-Marquardt algorithm to fit data to a non-linear equation using least squares.
- Author
- 2007-11-15 Kris Becker
Definition at line 42 of file NonLinearLSQ.h.
◆ NLMatrix
typedef TNT::Array2D<double> Isis::NonLinearLSQ::NLMatrix |
◆ NLVector
typedef TNT::Array1D<double> Isis::NonLinearLSQ::NLVector |
◆ NonLinearLSQ()
Isis::NonLinearLSQ::NonLinearLSQ |
( |
| ) |
|
|
inline |
◆ ~NonLinearLSQ()
virtual Isis::NonLinearLSQ::~NonLinearLSQ |
( |
| ) |
|
|
inlinevirtual |
◆ Abort()
void Isis::NonLinearLSQ::Abort |
( |
const std::string & | reason = "" | ) |
|
|
protected |
◆ absErr()
virtual double Isis::NonLinearLSQ::absErr |
( |
| ) |
const |
|
inlinevirtual |
◆ checkIteration()
virtual int Isis::NonLinearLSQ::checkIteration |
( |
const int | Iter, |
|
|
const NLVector & | fitcoefs, |
|
|
const NLVector & | uncerts, |
|
|
double | cplxconj, |
|
|
int | Istatus ) |
|
inlinevirtual |
◆ coefs()
NLVector Isis::NonLinearLSQ::coefs |
( |
| ) |
const |
|
inline |
◆ curvefit()
int Isis::NonLinearLSQ::curvefit |
( |
| ) |
|
◆ df()
int Isis::NonLinearLSQ::df |
( |
const gsl_vector * | x, |
|
|
void * | params, |
|
|
gsl_matrix * | J ) |
|
staticprivate |
◆ df_x()
virtual NLMatrix Isis::NonLinearLSQ::df_x |
( |
const NLVector & | x | ) |
|
|
pure virtual |
◆ doContinue()
bool Isis::NonLinearLSQ::doContinue |
( |
| ) |
const |
|
inlineprotected |
◆ f()
int Isis::NonLinearLSQ::f |
( |
const gsl_vector * | x, |
|
|
void * | params, |
|
|
gsl_vector * | fx ) |
|
staticprivate |
◆ f_x()
virtual NLVector Isis::NonLinearLSQ::f_x |
( |
const NLVector & | x | ) |
|
|
pure virtual |
◆ fdf()
int Isis::NonLinearLSQ::fdf |
( |
const gsl_vector * | x, |
|
|
void * | params, |
|
|
gsl_vector * | fx, |
|
|
gsl_matrix * | J ) |
|
staticprivate |
◆ getUncertainty()
NonLinearLSQ::NLVector Isis::NonLinearLSQ::getUncertainty |
( |
const gsl_matrix * | m | ) |
const |
|
private |
◆ gslToNlsq() [1/2]
NonLinearLSQ::NLMatrix Isis::NonLinearLSQ::gslToNlsq |
( |
const gsl_matrix * | m | ) |
const |
|
private |
◆ gslToNlsq() [2/2]
NonLinearLSQ::NLVector Isis::NonLinearLSQ::gslToNlsq |
( |
const gsl_vector * | v | ) |
const |
|
private |
◆ guess()
virtual NLVector Isis::NonLinearLSQ::guess |
( |
| ) |
|
|
pure virtual |
◆ maxIters()
int Isis::NonLinearLSQ::maxIters |
( |
| ) |
const |
|
inline |
◆ nIterations()
int Isis::NonLinearLSQ::nIterations |
( |
| ) |
const |
|
inline |
◆ NlsqTogsl() [1/2]
gsl_matrix * Isis::NonLinearLSQ::NlsqTogsl |
( |
const NLMatrix & | m, |
|
|
gsl_matrix * | gm = 0 ) const |
|
private |
◆ NlsqTogsl() [2/2]
gsl_vector * Isis::NonLinearLSQ::NlsqTogsl |
( |
const NLVector & | v, |
|
|
gsl_vector * | gv = 0 ) const |
|
private |
◆ nParms()
virtual int Isis::NonLinearLSQ::nParms |
( |
| ) |
const |
|
pure virtual |
◆ nSize()
virtual int Isis::NonLinearLSQ::nSize |
( |
| ) |
const |
|
pure virtual |
◆ relErr()
virtual double Isis::NonLinearLSQ::relErr |
( |
| ) |
const |
|
inlinevirtual |
◆ setMaxIters()
void Isis::NonLinearLSQ::setMaxIters |
( |
int | m | ) |
|
|
inline |
◆ status()
int Isis::NonLinearLSQ::status |
( |
| ) |
const |
|
inline |
◆ statusstr() [1/2]
std::string Isis::NonLinearLSQ::statusstr |
( |
| ) |
const |
|
inline |
◆ statusstr() [2/2]
std::string Isis::NonLinearLSQ::statusstr |
( |
int | status | ) |
const |
|
inline |
◆ success() [1/2]
bool Isis::NonLinearLSQ::success |
( |
| ) |
const |
|
inline |
◆ success() [2/2]
bool Isis::NonLinearLSQ::success |
( |
int | status | ) |
const |
|
inline |
◆ Terminate()
void Isis::NonLinearLSQ::Terminate |
( |
const std::string & | message = "" | ) |
|
|
protected |
◆ uncert()
NLVector Isis::NonLinearLSQ::uncert |
( |
| ) |
const |
|
inline |
◆ _fitParms
NLVector Isis::NonLinearLSQ::_fitParms |
|
private |
◆ _maxIters
int Isis::NonLinearLSQ::_maxIters |
|
private |
◆ _nIters
int Isis::NonLinearLSQ::_nIters |
|
private |
◆ _status
int Isis::NonLinearLSQ::_status |
|
private |
◆ _uncert
NLVector Isis::NonLinearLSQ::_uncert |
|
private |
◆ _userMessage
std::string Isis::NonLinearLSQ::_userMessage |
|
private |
◆ _userTerminated
bool Isis::NonLinearLSQ::_userTerminated |
|
private |
The documentation for this class was generated from the following files: