00001
00002
00014 #ifndef _LMFitter_H_
00015 #define _LMFitter_H_
00016
00017 #include <map>
00018 #include "Fitter.h"
00019
00032 class MDL_HIPPOPLOT_API LMFitter : public Fitter
00033 {
00034
00035 private:
00036
00037
00038
00039
00040
00042 std::vector < std::vector < double > > m_alpha;
00043
00045 std::vector < double > m_beta;
00046
00050 double m_chi_cutoff;
00051
00053 double m_start_lambda;
00054
00056 double m_lambda;
00057
00059 double m_lambda_shrink_factor;
00060
00062 double m_lambda_expand_factor;
00063
00065 std::map< std::string, double * > m_iter_params;
00066
00067 public:
00068
00071 LMFitter ( const char * name );
00072
00073 Fitter * clone () const;
00074
00078 virtual bool needsDerivatives () const;
00079
00082 virtual bool calcBestFit ();
00083
00086 virtual bool calcStep ();
00087
00089 virtual void calcAlpha ();
00090
00094 virtual int calcCovariance ( std::vector< std::vector < double > >& cov );
00095
00097 virtual bool solveSystem ();
00098
00103 double iterParam( std::string name );
00104
00109 int setIterParam( std::string name, double value );
00110
00111 };
00112
00113 #endif // _LMFitter_H_