Main MRPT website > C++ reference
MRPT logo

mrpt::math::CLevenbergMarquardtTempl< VECTORTYPE, USERPARAM > Class Template Reference

An implementation of the Levenberg-Marquardt algorithm for least-square minimization. More...

#include <mrpt/math/CLevenbergMarquardt.h>

Inheritance diagram for mrpt::math::CLevenbergMarquardtTempl< VECTORTYPE, USERPARAM >:
Inheritance graph
[legend]
Collaboration diagram for mrpt::math::CLevenbergMarquardtTempl< VECTORTYPE, USERPARAM >:
Collaboration graph
[legend]

List of all members.

Classes

struct  TResultInfo

Public Types

typedef VECTORTYPE::value_type NUMTYPE
typedef void(* TFunctor )(const VECTORTYPE &x, const USERPARAM &y, VECTORTYPE &out)
 The type of the function passed to execute.

Static Public Member Functions

static void execute (VECTORTYPE &out_optimal_x, const VECTORTYPE &x0, TFunctor functor, const VECTORTYPE &increments, const USERPARAM &userParam, TResultInfo &out_info, bool verbose=false, const size_t &maxIter=200, const NUMTYPE tau=1e-3, const NUMTYPE e1=1e-8, const NUMTYPE e2=1e-8, bool returnPath=true)
 Executes the LM-method, with derivatives estimated from "functor" Is a user-provided function which takes as input two vectors, in this order:

  • x: The parameters to be optimized.


Detailed Description

template<typename VECTORTYPE = mrpt::vector_double, class USERPARAM = VECTORTYPE>
class mrpt::math::CLevenbergMarquardtTempl< VECTORTYPE, USERPARAM >

An implementation of the Levenberg-Marquardt algorithm for least-square minimization.

Refer to the wiki page for more details on the algorithm and usage.

The parameters of the template are:

Definition at line 51 of file CLevenbergMarquardt.h.


Member Typedef Documentation

template<typename VECTORTYPE = mrpt::vector_double, class USERPARAM = VECTORTYPE>
typedef VECTORTYPE::value_type mrpt::math::CLevenbergMarquardtTempl< VECTORTYPE, USERPARAM >::NUMTYPE

Definition at line 54 of file CLevenbergMarquardt.h.

template<typename VECTORTYPE = mrpt::vector_double, class USERPARAM = VECTORTYPE>
typedef void(* mrpt::math::CLevenbergMarquardtTempl< VECTORTYPE, USERPARAM >::TFunctor)(const VECTORTYPE &x, const USERPARAM &y, VECTORTYPE &out)

The type of the function passed to execute.

The user must supply a function which evaluates the error of a given point in the solution space.

Parameters:
x The state point under examination.
y The same object passed to "execute" as the parameter "userParam".
out The vector of (non-squared) errors, of the average square root error, for the given "x". The functor code must set the size of this vector.

Definition at line 62 of file CLevenbergMarquardt.h.


Member Function Documentation

template<typename VECTORTYPE = mrpt::vector_double, class USERPARAM = VECTORTYPE>
static void mrpt::math::CLevenbergMarquardtTempl< VECTORTYPE, USERPARAM >::execute ( VECTORTYPE &  out_optimal_x,
const VECTORTYPE &  x0,
TFunctor  functor,
const VECTORTYPE &  increments,
const USERPARAM &  userParam,
TResultInfo &  out_info,
bool  verbose = false,
const size_t &  maxIter = 200,
const NUMTYPE  tau = 1e-3,
const NUMTYPE  e1 = 1e-8,
const NUMTYPE  e2 = 1e-8,
bool  returnPath = true 
) [inline, static]
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines



Page generated by Doxygen 1.6.2-20100208 for MRPT 0.9.0 SVN: at Sun Jun 6 22:55:28 UTC 2010