#include <ConfigurableAnnealing.h>
Public Member Functions | |
void | anneal () |
ConfigurableAnnealing * | clone () const |
ConfigurableAnnealing (const edm::ParameterSet &) | |
ConfigurableAnnealing (const ConfigurableAnnealing &) | |
double | currentTemp () const |
double | cutoff () const |
void | debug () const |
double | initialTemp () const |
bool | isAnnealed () const |
double | phi (double chi2) const |
void | resetAnnealing () |
double | weight (double chi2) const |
~ConfigurableAnnealing () | |
Private Attributes | |
AnnealingSchedule * | theImpl |
Definition at line 8 of file ConfigurableAnnealing.h.
ConfigurableAnnealing::ConfigurableAnnealing | ( | const edm::ParameterSet & | m | ) |
An annealing schedule that is completely configurable via edm::ParameterSet
Definition at line 9 of file ConfigurableAnnealing.cc.
References cmsRelvalreport::exit, edm::ParameterSet::getParameter(), and theImpl.
Referenced by clone().
: theImpl( 0 ) { string type = m.getParameter<string>("annealing"); // edm::LogWarning("ConfigurableAnnealing") << "below one code ist still here."; if ( type == "below" ) { edm::LogError("ConfigurableAnnealing") << "below one annealing employed!"; vector < float > sched; double final = m.getParameter<double>("Tfinal"); sched.push_back ( 256. ); sched.push_back ( 64. ); sched.push_back ( 16. ); sched.push_back ( 4. ); sched.push_back ( 1. ); sched.push_back ( final ); theImpl = new DeterministicAnnealing( sched, m.getParameter<double>("sigmacut")); } else if ( type =="geom" ) { theImpl = new GeometricAnnealing( m.getParameter<double>("sigmacut"), m.getParameter<double>("Tini"), m.getParameter<double>("ratio") ); } else { edm::LogError("ConfigurableAnnealing") << "annealing type " << type << " is not known."; exit(-1); } }
ConfigurableAnnealing::~ConfigurableAnnealing | ( | ) |
ConfigurableAnnealing::ConfigurableAnnealing | ( | const ConfigurableAnnealing & | o | ) |
Definition at line 37 of file ConfigurableAnnealing.cc.
void ConfigurableAnnealing::anneal | ( | ) | [virtual] |
Implements AnnealingSchedule.
Definition at line 56 of file ConfigurableAnnealing.cc.
References AnnealingSchedule::anneal(), and theImpl.
ConfigurableAnnealing * ConfigurableAnnealing::clone | ( | void | ) | const [virtual] |
Implements AnnealingSchedule.
Definition at line 41 of file ConfigurableAnnealing.cc.
References ConfigurableAnnealing().
{ return new ConfigurableAnnealing ( *this ); }
double ConfigurableAnnealing::currentTemp | ( | ) | const [virtual] |
Implements AnnealingSchedule.
Definition at line 81 of file ConfigurableAnnealing.cc.
References AnnealingSchedule::currentTemp(), and theImpl.
{ return theImpl->currentTemp(); }
double ConfigurableAnnealing::cutoff | ( | ) | const [virtual] |
Implements AnnealingSchedule.
Definition at line 76 of file ConfigurableAnnealing.cc.
References AnnealingSchedule::cutoff(), and theImpl.
void ConfigurableAnnealing::debug | ( | ) | const [virtual] |
Implements AnnealingSchedule.
Definition at line 51 of file ConfigurableAnnealing.cc.
References AnnealingSchedule::debug(), and theImpl.
double ConfigurableAnnealing::initialTemp | ( | ) | const [virtual] |
Implements AnnealingSchedule.
Definition at line 86 of file ConfigurableAnnealing.cc.
References AnnealingSchedule::initialTemp(), and theImpl.
{ return theImpl->initialTemp(); }
bool ConfigurableAnnealing::isAnnealed | ( | ) | const [virtual] |
Returns phi(chi2) / ( phi(cutoff^2) + sum_i { phi(chi2s[i]) } ) is it annealed yet?
Implements AnnealingSchedule.
Definition at line 91 of file ConfigurableAnnealing.cc.
References AnnealingSchedule::isAnnealed(), and theImpl.
{ return theImpl->isAnnealed(); }
double ConfigurableAnnealing::phi | ( | double | chi2 | ) | const [inline, virtual] |
phi ( chi2 ) = e^( -.5*chi2 / T )
Implements AnnealingSchedule.
Definition at line 71 of file ConfigurableAnnealing.cc.
References AnnealingSchedule::phi(), and theImpl.
void ConfigurableAnnealing::resetAnnealing | ( | ) | [virtual] |
Implements AnnealingSchedule.
Definition at line 66 of file ConfigurableAnnealing.cc.
References AnnealingSchedule::resetAnnealing(), and theImpl.
{ theImpl->resetAnnealing(); }
double ConfigurableAnnealing::weight | ( | double | chi2 | ) | const [virtual] |
Returns phi(chi2) / ( phi(cutoff^2) + phi(chi2) ),
Implements AnnealingSchedule.
Definition at line 61 of file ConfigurableAnnealing.cc.
References theImpl, and AnnealingSchedule::weight().
AnnealingSchedule* ConfigurableAnnealing::theImpl [private] |
Definition at line 31 of file ConfigurableAnnealing.h.
Referenced by anneal(), ConfigurableAnnealing(), currentTemp(), cutoff(), debug(), initialTemp(), isAnnealed(), phi(), resetAnnealing(), weight(), and ~ConfigurableAnnealing().