Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:28:24

0001 #ifndef AnnealingSchedule_H
0002 #define AnnealingSchedule_H
0003 
0004 #include <vector>
0005 
0006 class AnnealingSchedule {
0007   /** Abstract base class that is implemented by the different
0008    *  annealing schedules.
0009    */
0010 public:
0011   virtual ~AnnealingSchedule(){};
0012   virtual void anneal() = 0;  //< One annealing step.
0013   virtual void resetAnnealing() = 0;
0014 
0015   /**
0016    *  phi ( chi2 ) = e^( -.5*chi2 / T )
0017    */
0018   virtual double phi(double chi2) const = 0;
0019 
0020   /**
0021    *  Returns phi(chi2) / ( phi(cutoff^2) + phi(chi2) ),
0022    */
0023   virtual double weight(double chi2) const = 0;
0024 
0025   /**
0026    *  Returns phi(chi2) / ( phi(cutoff^2) + sum_i { phi(chi2s[i]) } )
0027    */
0028   // double weight ( double chi2, const vector < double > & chi2s ) const;
0029 
0030   /**
0031    * is it annealed yet?
0032    */
0033   virtual bool isAnnealed() const = 0;
0034 
0035   virtual double cutoff() const = 0;
0036   virtual double currentTemp() const = 0;
0037   virtual double initialTemp() const = 0;
0038 
0039   virtual void debug() const = 0;
0040 
0041   virtual AnnealingSchedule* clone() const = 0;
0042 };
0043 
0044 #endif