Isis 3 Programmer Reference
|
NonLinearLSQ Computes a fit using a Levenberg-Marquardt algorithm. More...
#include <NonLinearLSQ.h>
Classes | |
struct | _nlsqPointer |
Public Types | |
typedef TNT::Array1D< double > | NLVector |
typedef TNT::Array2D< double > | NLMatrix |
Public Member Functions | |
virtual | ~NonLinearLSQ () |
Destructor. More... | |
virtual int | nSize () const =0 |
virtual int | nParms () const =0 |
void | setMaxIters (int m) |
Sets the maximum number of iterations. More... | |
int | maxIters () const |
Maximum number iterations for valid solution. More... | |
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. More... | |
bool | success () const |
Determine success from last fit processing. More... | |
bool | success (int status) const |
Check status for success of the given condition. More... | |
std::string | statusstr () const |
Return error message pertaining to last fit procesing. More... | |
std::string | statusstr (int status) const |
Return error message given status condition. More... | |
virtual int | checkIteration (const int Iter, const NLVector &fitcoefs, const NLVector &uncerts, double cplxconj, int Istatus) |
Default interation test simply returns input status. More... | |
NLVector | coefs () const |
Return coefficients from last fit processing. More... | |
NLVector | uncert () const |
Return uncertainties from last fit processing. More... | |
int | nIterations () const |
Return number of iterations from last fit processing. More... | |
Protected Member Functions | |
void | Terminate (const std::string &message="") |
void | Abort (const std::string &reason="") |
bool | doContinue () const |
Private Attributes | |
NLVector | _fitParms |
NLVector | _uncert |
int | _nIters |
int | _maxIters |
int | _status |
bool | _userTerminated |
std::string | _userMessage |
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.
Definition at line 57 of file NonLinearLSQ.h.
|
inlinevirtual |
Destructor.
Definition at line 67 of file NonLinearLSQ.h.
|
inlinevirtual |
Default interation test simply returns input status.
Reimplemented in Isis::ZeroBufferFit.
Definition at line 111 of file NonLinearLSQ.h.
|
inline |
Return coefficients from last fit processing.
Definition at line 118 of file NonLinearLSQ.h.
Referenced by Isis::ZeroBufferFit::Solve().
|
inline |
Maximum number iterations for valid solution.
Definition at line 85 of file NonLinearLSQ.h.
Referenced by Isis::ZeroBufferFit::ZeroBufferFit().
|
inline |
Return number of iterations from last fit processing.
Definition at line 122 of file NonLinearLSQ.h.
Referenced by Isis::ZeroBufferFit::Solve().
|
inline |
Sets the maximum number of iterations.
m | User provides the maximum number iterations |
Definition at line 77 of file NonLinearLSQ.h.
Referenced by Isis::ZeroBufferFit::ZeroBufferFit().
|
inline |
Return status of last fit processing.
Definition at line 96 of file NonLinearLSQ.h.
Referenced by statusstr(), and success().
|
inline |
Return error message pertaining to last fit procesing.
Definition at line 102 of file NonLinearLSQ.h.
Referenced by Isis::ZeroBufferFit::Solve().
|
inline |
Return error message given status condition.
Definition at line 106 of file NonLinearLSQ.h.
References status().
|
inline |
Determine success from last fit processing.
Definition at line 98 of file NonLinearLSQ.h.
Referenced by Isis::ZeroBufferFit::Solve().
|
inline |
Check status for success of the given condition.
Definition at line 100 of file NonLinearLSQ.h.
References status().
|
inline |
Return uncertainties from last fit processing.
Definition at line 120 of file NonLinearLSQ.h.
Referenced by Isis::ZeroBufferFit::Solve().