Isis Developer Reference
Isis::NonLinearLSQ Class Referenceabstract

NonLinearLSQ Computes a fit using a Levenberg-Marquardt algorithm. More...

#include <NonLinearLSQ.h>

Inheritance diagram for Isis::NonLinearLSQ:
Inheritance graph
Collaboration diagram for Isis::NonLinearLSQ:
Collaboration graph

Public Types

typedef TNT::Array1D< double > NLVector
 
typedef TNT::Array2D< double > NLMatrix
 

Public Member Functions

 NonLinearLSQ ()
 
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
 

Detailed Description

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

Member Typedef Documentation

◆ NLMatrix

typedef TNT::Array2D<double> Isis::NonLinearLSQ::NLMatrix

◆ NLVector

typedef TNT::Array1D<double> Isis::NonLinearLSQ::NLVector

Constructor & Destructor Documentation

◆ NonLinearLSQ()

Isis::NonLinearLSQ::NonLinearLSQ ( )
inline

◆ ~NonLinearLSQ()

virtual Isis::NonLinearLSQ::~NonLinearLSQ ( )
inlinevirtual

Destructor.

Member Function Documentation

◆ Abort()

void Isis::NonLinearLSQ::Abort ( const std::string &  reason = "")
protected

◆ absErr()

virtual double Isis::NonLinearLSQ::absErr ( ) const
inlinevirtual

Reimplemented in Isis::ZeroBufferFit.

References Isis::E.

◆ checkIteration()

virtual int Isis::NonLinearLSQ::checkIteration ( const int  Iter,
const NLVector fitcoefs,
const NLVector uncerts,
double  cplxconj,
int  Istatus 
)
inlinevirtual

Default interation test simply returns input status.

Reimplemented in Isis::ZeroBufferFit.

◆ coefs()

NLVector Isis::NonLinearLSQ::coefs ( ) const
inline

Return coefficients from last fit processing.

Referenced by Isis::ZeroBufferFit::Solve().

◆ curvefit()

int Isis::NonLinearLSQ::curvefit ( )

◆ df_x()

virtual NLMatrix Isis::NonLinearLSQ::df_x ( const NLVector x)
pure virtual

Implemented in Isis::ZeroBufferFit.

◆ doContinue()

bool Isis::NonLinearLSQ::doContinue ( ) const
inlineprotected

◆ f_x()

virtual NLVector Isis::NonLinearLSQ::f_x ( const NLVector x)
pure virtual

Implemented in Isis::ZeroBufferFit.

◆ guess()

virtual NLVector Isis::NonLinearLSQ::guess ( )
pure virtual

Implemented in Isis::ZeroBufferFit.

◆ maxIters()

int Isis::NonLinearLSQ::maxIters ( ) const
inline

Maximum number iterations for valid solution.

Returns
int Maximum resolutions

Referenced by Isis::ZeroBufferFit::ZeroBufferFit().

◆ nIterations()

int Isis::NonLinearLSQ::nIterations ( ) const
inline

Return number of iterations from last fit processing.

Referenced by Isis::ZeroBufferFit::Solve().

◆ nParms()

virtual int Isis::NonLinearLSQ::nParms ( ) const
pure virtual

Implemented in Isis::ZeroBufferFit.

◆ nSize()

virtual int Isis::NonLinearLSQ::nSize ( ) const
pure virtual

Implemented in Isis::ZeroBufferFit.

◆ relErr()

virtual double Isis::NonLinearLSQ::relErr ( ) const
inlinevirtual

Reimplemented in Isis::ZeroBufferFit.

References Isis::E.

◆ setMaxIters()

void Isis::NonLinearLSQ::setMaxIters ( int  m)
inline

Sets the maximum number of iterations.

Parameters
mUser provides the maximum number iterations

Referenced by Isis::ZeroBufferFit::ZeroBufferFit().

◆ status()

int Isis::NonLinearLSQ::status ( ) const
inline

Return status of last fit processing.

Referenced by statusstr(), and success().

◆ statusstr() [1/2]

std::string Isis::NonLinearLSQ::statusstr ( ) const
inline

Return error message pertaining to last fit procesing.

Referenced by Isis::ZeroBufferFit::Solve().

◆ statusstr() [2/2]

std::string Isis::NonLinearLSQ::statusstr ( int  status) const
inline

Return error message given status condition.

References status().

◆ success() [1/2]

bool Isis::NonLinearLSQ::success ( ) const
inline

Determine success from last fit processing.

Referenced by Isis::ZeroBufferFit::Solve().

◆ success() [2/2]

bool Isis::NonLinearLSQ::success ( int  status) const
inline

Check status for success of the given condition

References status().

◆ Terminate()

void Isis::NonLinearLSQ::Terminate ( const std::string &  message = "")
protected

◆ uncert()

NLVector Isis::NonLinearLSQ::uncert ( ) const
inline

Return uncertainties from last fit processing.

Referenced by Isis::ZeroBufferFit::Solve().


The documentation for this class was generated from the following files: