Main Page   Groups   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Concepts

vnl_levenberg_marquardt Class Reference

#include <vnl_levenberg_marquardt.h>

Inheritance diagram for vnl_levenberg_marquardt:

Inheritance graph
[legend]
Collaboration diagram for vnl_levenberg_marquardt:

Collaboration graph
[legend]
List of all members.

Public Methods

 vnl_levenberg_marquardt (vnl_least_squares_function &f)
 vnl_levenberg_marquardt (vnl_least_squares_function &f, vnl_vector< double > &x)
 ~vnl_levenberg_marquardt ()
bool minimize_without_gradient (vnl_vector< double > &x)
bool minimize_using_gradient (vnl_vector< double > &x)
bool minimize (vnl_vector< double > &x)
void diagnose_outcome () const
void diagnose_outcome (vcl_ostream &) const
vnl_matrix< double > const & get_JtJ ()

Protected Methods

void init (vnl_least_squares_function *f)

Static Protected Methods

int lmdif_lsqfun (int *m, int *n, const double *x, double *fx, int *iflag)
int lmder_lsqfun (int *m, int *n, const double *x, double *fx, double *fJ, int &, int *iflag)

Protected Attributes

vnl_least_squares_functionf_
vnl_matrix< double > * fdjac_
vnl_vector< int > * ipvt_
vnl_matrix< double > * covariance_
bool set_covariance_

Friends

class vnl_levenberg_marquardt_Activate

Detailed Description

Levenberg Marquardt nonlinear least squares. vnl_levenberg_marquardt is an interface to the MINPACK routine lmdif, and implements Levenberg Marquardt nonlinear fitting. The function to be minimized is passed as a vnl_least_squares_function object, which may or may not wish to provide derivatives. If derivatives are not supplied, they are calculated by forward differencing, which costs one function evaluation per dimension, but is perfectly accurate. (See Hartley in ``Applications of Invariance in Computer Vision'' for example).

Definition at line 33 of file vnl_levenberg_marquardt.h.


Constructor & Destructor Documentation

vnl_levenberg_marquardt::vnl_levenberg_marquardt vnl_least_squares_function   f [inline]
 

Initialize with the function object that is to be minimized.

Definition at line 38 of file vnl_levenberg_marquardt.h.

References init(), and minimize().

vnl_levenberg_marquardt::vnl_levenberg_marquardt vnl_least_squares_function   f,
vnl_vector< double > &    x
[inline]
 

Initialize as above, and then run minimization.

Definition at line 42 of file vnl_levenberg_marquardt.h.

vnl_levenberg_marquardt::~vnl_levenberg_marquardt  
 


Member Function Documentation

void vnl_levenberg_marquardt::diagnose_outcome vcl_ostream &    const
 

void vnl_levenberg_marquardt::diagnose_outcome   const
 

Provide an ASCII diagnosis of the last minimization on ostream.

vnl_matrix<double> const& vnl_levenberg_marquardt::get_JtJ  
 

Return J'*J computed at last minimum.

void vnl_levenberg_marquardt::init vnl_least_squares_function   f [protected]
 

Referenced by vnl_levenberg_marquardt().

int vnl_levenberg_marquardt::lmder_lsqfun int *    m,
int *    n,
const double *    x,
double *    fx,
double *    fJ,
int &   ,
int *    iflag
[static, protected]
 

int vnl_levenberg_marquardt::lmdif_lsqfun int *    m,
int *    n,
const double *    x,
double *    fx,
int *    iflag
[static, protected]
 

bool vnl_levenberg_marquardt::minimize vnl_vector< double > &    x [inline]
 

Definition at line 58 of file vnl_levenberg_marquardt.h.

References covariance_, f_, fdjac_, ipvt_, and set_covariance_.

Referenced by vnl_levenberg_marquardt().

bool vnl_levenberg_marquardt::minimize_using_gradient vnl_vector< double > &    x
 

bool vnl_levenberg_marquardt::minimize_without_gradient vnl_vector< double > &    x
 

Minimize the function supplied in the constructor until convergence. or failure. On return, x is such that f(x) is the lowest value achieved. Returns true for convergence, false for failure.


Friends And Related Function Documentation

friend class vnl_levenberg_marquardt_Activate [friend]
 

Definition at line 83 of file vnl_levenberg_marquardt.h.


Member Data Documentation

vnl_matrix<double>* vnl_levenberg_marquardt::covariance_ [protected]
 

Definition at line 77 of file vnl_levenberg_marquardt.h.

Referenced by minimize().

vnl_least_squares_function* vnl_levenberg_marquardt::f_ [protected]
 

Definition at line 73 of file vnl_levenberg_marquardt.h.

Referenced by minimize().

vnl_matrix<double>* vnl_levenberg_marquardt::fdjac_ [protected]
 

Definition at line 74 of file vnl_levenberg_marquardt.h.

Referenced by minimize().

vnl_vector<int>* vnl_levenberg_marquardt::ipvt_ [protected]
 

Definition at line 75 of file vnl_levenberg_marquardt.h.

Referenced by minimize().

bool vnl_levenberg_marquardt::set_covariance_ [protected]
 

Definition at line 78 of file vnl_levenberg_marquardt.h.

Referenced by minimize().


The documentation for this class was generated from the following file:
Generated at Wed Mar 12 01:13:33 2003 for ITK by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2000