MINT2
IMinimisable.h
Go to the documentation of this file.
1 #ifndef IMINIMISABLE_HH
2 #define IMINIMISABLE_HH
3 // author: Jonas Rademacker (Jonas.Rademacker@bristol.ac.uk)
4 // status: Mon 9 Feb 2009 19:17:55 GMT
5 #include <iostream>
7 #include <vector>
8 
9 namespace MINT{
11  public:
12  virtual MinuitParameterSet* getParSet() = 0;
13 
14  virtual void beginFit()=0;
15  virtual void parametersChanged()=0;
16  virtual void endFit()=0;
17 
18  virtual double getVal()=0;
19  virtual double getNewVal()=0;
20 
21  // we should make the following three abstract (=0)
22  // and move their default definition to Minimisable.
23 
24  virtual void Gradient(std::vector<double>& grad){
25  std::cout << "Gradient of pdf is not implemented."
26  << "Please implement me or set useAnalyticGradient to 0 in your options file."
27  << " I'll crash now. " << std::endl;
28  throw "crash";
29  (void)grad;
30  }
31  virtual bool useAnalyticGradient() {return false;}
33  { (void)useAnalyticGradient; };
34 
35  virtual ~IMinimisable(){}
36 };
37 }//namespace MINT
38 
39 #endif
40 //
virtual void endFit()=0
virtual ~IMinimisable()
Definition: IMinimisable.h:35
virtual void Gradient(std::vector< double > &grad)
Definition: IMinimisable.h:24
virtual void beginFit()=0
virtual bool useAnalyticGradient()
Definition: IMinimisable.h:31
virtual double getVal()=0
virtual void setUseAnalyticGradient(bool useAnalyticGradient)
Definition: IMinimisable.h:32
virtual MinuitParameterSet * getParSet()=0
virtual void parametersChanged()=0
virtual double getNewVal()=0