MRPT logo

mrpt::math::CLevenbergMarquardtTempl< NUMTYPE, 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< NUMTYPE, USERPARAM >:

mrpt::utils::CDebugOutputCapable

List of all members.

Classes

struct  TResultInfo

Public Types

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

Static Public Member Functions

static void execute (std::vector< NUMTYPE > &out_optimal_x, const std::vector< NUMTYPE > &x0, TFunctor functor, const std::vector< NUMTYPE > &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)
 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 NUMTYPE = double, class USERPARAM = std::vector<NUMTYPE>>
class mrpt::math::CLevenbergMarquardtTempl< NUMTYPE, 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 NUMTYPE = double, class USERPARAM = std::vector<NUMTYPE>>
typedef void(* mrpt::math::CLevenbergMarquardtTempl< NUMTYPE, USERPARAM >::TFunctor)(const std::vector< NUMTYPE > &x, const USERPARAM &y, std::vector< NUMTYPE > &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 60 of file CLevenbergMarquardt.h.


Member Function Documentation

template<typename NUMTYPE = double, class USERPARAM = std::vector<NUMTYPE>>
static void mrpt::math::CLevenbergMarquardtTempl< NUMTYPE, USERPARAM >::execute ( std::vector< NUMTYPE > &  out_optimal_x,
const std::vector< NUMTYPE > &  x0,
TFunctor  functor,
const std::vector< NUMTYPE > &  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 
) [inline, static]




Page generated by Doxygen 1.5.9 for MRPT 0.7.1 SVN: at Mon Aug 17 22:27:43 EDT 2009