BFGSFitter.h
Go to the documentation of this file.
1 /* -*- mode: c++ -*- */
2 
14 #include <map>
15 
16 #ifndef _BFGSFitter_H_
17 #define _BFGSFitter_H_
18 
19 #include "Fitter.h"
20 
21 namespace hippodraw {
22 
34 {
35 private:
36 
37  /* Using compiler generated copy constructor.
38  BFGSFitter ( const BFGSFitter & )
39  */
40 
42  std::vector< std::vector< double > > m_M;
43 
45  std::vector< double > m_xinit;
46 
50  double m_grad_cutoff;
51 
55  double m_step_cutoff;
56 
59  double m_proj_cutoff;
60 
77  double m_c1, m_c2;
78 
81  double m_alpha_max;
82 
85  double m_alpha1;
86 
88  std::map< std::string, double * > m_iter_params;
89 
90  public:
92  BFGSFitter ( const char * name );
93 
94  Fitter * clone () const;
95 
99  virtual int calcCovariance ( std::vector< std::vector < double > >& cov );
100 
104  double wolfeStep( const std::vector< double > & x0,
105  const std::vector< double > & p ) const;
106 
110  double zoom( const std::vector< double >& x0,
111  const std::vector< double >& p,
112  double phi0, double dphi0,
113  double Alphalo, double Alphahi ) const;
114 
116  double interpolate( const std::vector< double >& x0,
117  const std::vector< double >& p,
118  double Alphaim, double Alphai ) const;
119 
121  double function( const std::vector< double > & x ) const;
122 
124  std::vector< double > gradient( const std::vector< double > & x ) const;
125 
128  double gradp( const std::vector< double > & u,
129  const std::vector< double > & p ) const;
130 
132  const std::vector< double > & initIter() const;
133 
135  int setInitIter( const std::vector< double > & xinit );
136 
141  double iterParam( std::string name );
142 
147  int setIterParam( std::string name, double value );
148 
152  virtual bool calcBestFit();
153 
154 };
155 
156 } // namespace hippodraw
157 
158 #endif // _BFGSFitter_H_

Generated for HippoDraw Class Library by doxygen