#include <GeometricAnnealing.h>
Classes | |
class | A |
Public Member Functions | |
void | anneal () |
GeometricAnnealing * | clone () const |
double | currentTemp () const |
double | cutoff () const |
void | debug () const |
GeometricAnnealing (const double cutoff=3.0, const double T=256.0, const double annealing_ratio=0.25) | |
double | initialTemp () const |
bool | isAnnealed () const |
double | phi (double chi2) const |
void | resetAnnealing () |
double | weight (double chi2) const |
Private Attributes | |
double | theChi2cut |
double | theRatio |
double | theT |
double | theT0 |
Definition at line 7 of file GeometricAnnealing.h.
GeometricAnnealing::GeometricAnnealing | ( | const double | cutoff = 3.0 , |
const double | T = 256.0 , |
||
const double | annealing_ratio = 0.25 |
||
) |
void GeometricAnnealing::anneal | ( | ) | [virtual] |
Implements AnnealingSchedule.
Definition at line 11 of file GeometricAnnealing.cc.
GeometricAnnealing* GeometricAnnealing::clone | ( | void | ) | const [inline, virtual] |
Implements AnnealingSchedule.
Definition at line 45 of file GeometricAnnealing.h.
References GeometricAnnealing().
{ return new GeometricAnnealing ( * this ); };
double GeometricAnnealing::currentTemp | ( | ) | const [virtual] |
Implements AnnealingSchedule.
Definition at line 44 of file GeometricAnnealing.cc.
References theT.
{ return theT; }
double GeometricAnnealing::cutoff | ( | ) | const [virtual] |
Implements AnnealingSchedule.
Definition at line 38 of file GeometricAnnealing.cc.
References mathSSE::sqrt(), and theChi2cut.
{ // std::cout << "[GeometricAnnealing] cutoff called!" << std::endl; return sqrt(theChi2cut); }
void GeometricAnnealing::debug | ( | ) | const [virtual] |
Implements AnnealingSchedule.
Definition at line 381 of file DTParametrizedDriftAlgo.cc.
double GeometricAnnealing::initialTemp | ( | ) | const [virtual] |
Implements AnnealingSchedule.
Definition at line 49 of file GeometricAnnealing.cc.
References theT0.
{ return theT0; }
bool GeometricAnnealing::isAnnealed | ( | ) | const [virtual] |
is it annealed yet?
Implements AnnealingSchedule.
Definition at line 54 of file GeometricAnnealing.cc.
References theT.
{ return ( theT < 1.02 ); }
double GeometricAnnealing::phi | ( | double | chi2 | ) | const [virtual] |
phi ( chi2 ) = e^( -.5 * chi2 / T )
Implements AnnealingSchedule.
Definition at line 33 of file GeometricAnnealing.cc.
References funct::exp(), and theT.
Referenced by weight().
void GeometricAnnealing::resetAnnealing | ( | ) | [virtual] |
Implements AnnealingSchedule.
Definition at line 28 of file GeometricAnnealing.cc.
double GeometricAnnealing::weight | ( | double | chi2 | ) | const [virtual] |
Returns phi(chi2) / ( phi(cutoff^2) + phi(chi2) ),
Implements AnnealingSchedule.
Definition at line 16 of file GeometricAnnealing.cc.
References phi(), and theChi2cut.
{ double mphi = phi ( chi2 ); long double newtmp = mphi / ( mphi + phi ( theChi2cut ) ); if ( std::isinf(newtmp) ) { if ( chi2 < theChi2cut ) newtmp=1.; else newtmp=0.; } return newtmp; }
double GeometricAnnealing::theChi2cut [private] |
Definition at line 53 of file GeometricAnnealing.h.
double GeometricAnnealing::theRatio [private] |
Definition at line 54 of file GeometricAnnealing.h.
Referenced by anneal().
double GeometricAnnealing::theT [private] |
Definition at line 52 of file GeometricAnnealing.h.
Referenced by anneal(), currentTemp(), isAnnealed(), phi(), and resetAnnealing().
double GeometricAnnealing::theT0 [private] |
Definition at line 48 of file GeometricAnnealing.h.
Referenced by initialTemp(), and resetAnnealing().