Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

BFGSFitter.h

Go to the documentation of this file.
00001 /* -*- mode: c++ -*- */
00002 
00014 #include <map>
00015 
00016 #ifndef _BFGSFitter_H_
00017 #define _BFGSFitter_H_
00018 
00019 #include "Fitter.h"
00020 
00031 class MDL_HIPPOPLOT_API BFGSFitter: public Fitter
00032 {
00033 private:
00034 
00035   /* Using compiler generated copy constructor. 
00036      BFGSFitter ( const BFGSFitter & )
00037   */
00038 
00040   std::vector< std::vector< double > > m_M;
00041   
00043   std::vector< double > m_xinit;
00044   
00048   double m_grad_cutoff;
00049   
00053   double m_step_cutoff;
00054   
00057   double m_proj_cutoff;
00058   
00075   double m_c1, m_c2;
00076   
00079   double m_alpha_max; 
00080   
00083   double m_alpha1;
00084 
00086   std::map< std::string, double * >  m_iter_params;
00087     
00088  public:
00090   BFGSFitter ( const char * name );
00091   
00092   Fitter * clone () const;
00093   
00097   virtual bool needsDerivatives () const;
00098 
00102   virtual int calcCovariance ( std::vector< std::vector < double > >& cov );
00103   
00107   double wolfeStep( const std::vector< double > & x0,
00108                     const std::vector< double > & p ) const;
00109 
00113   double zoom( const std::vector< double >& x0,
00114                const std::vector< double >& p,
00115                double phi0, double dphi0,
00116                double Alphalo, double Alphahi ) const;
00117 
00119   double interpolate( const std::vector< double >& x0,
00120                       const std::vector< double >& p,
00121                       double Alphaim, double Alphai ) const;
00122   
00124   double function( const std::vector< double > & x ) const;
00125 
00127   std::vector< double > gradient( const std::vector< double > & x ) const;
00128 
00131   double gradp( const std::vector< double > & u,
00132                 const std::vector< double > & p ) const;
00133   
00135   const std::vector< double > & initIter() const;
00136   
00138   int setInitIter( const std::vector< double > & xinit );
00139 
00144   double iterParam( std::string name );
00145 
00150   int setIterParam( std::string name, double value );  
00151   
00154   virtual bool calcBestFit(); 
00155 };
00156 
00157 #endif // _BFGSFitter_H_

Generated for HippoDraw-1.14.8.5 by doxygen 1.4.3