ROOT
6.06/09
Reference Guide
|
GSLSimAnFunc class description.
Interface class for the objetive function to be used in simulated annealing If user wants to re-implement some of the methods (like the one defining the metric) which are used by the the simulated annealing algorithm must build a user derived class. NOTE: Derived classes must re-implement the assignment and copy constructor to call them of the parent class
Definition at line 50 of file GSLSimAnnealing.h.
Public Member Functions | |
GSLSimAnFunc (const ROOT::Math::IMultiGenFunction &func, const double *x) | |
construct from an interface of a multi-dimensional function More... | |
GSLSimAnFunc (const ROOT::Math::IMultiGenFunction &func, const double *x, const double *scale) | |
construct from an interface of a multi-dimensional function Use optionally a scale factor (for each coordinate) which can be used to scale the step sizes (this is used for example by the minimization algorithm) More... | |
virtual | ~GSLSimAnFunc () |
virtual distructor (no operations) More... | |
virtual GSLSimAnFunc & | FastCopy (const GSLSimAnFunc &f) |
fast copy method called by GSL simuated annealing internally copy only the things which have been changed must be re-implemented by derived classes if needed More... | |
virtual GSLSimAnFunc * | Clone () const |
clone method. More... | |
virtual double | Energy () const |
evaluate the energy ( objective function value) re-implement by derived classes if needed to be modified More... | |
virtual void | Step (const GSLRandomEngine &r, double maxstep) |
change the x[i] value using a random value urndm generated between [0,1] up to a maximum value maxstep re-implement by derived classes if needed to be modified More... | |
virtual double | Distance (const GSLSimAnFunc &func) const |
calculate the distance (metric) between this one and another configuration Presently a cartesian metric is used. More... | |
virtual void | Print () |
print the position in the standard output std::ostream GSL prints in addition n iteration, n function calls, temperature and energy re-implement by derived classes if necessary More... | |
void | SetX (const double *x) |
change the x values (used by sim annealing to take a step) More... | |
template<class IT > | |
void | SetX (IT begin, IT end) |
unsigned int | NDim () const |
double | X (unsigned int i) const |
const std::vector< double > & | X () const |
double | Scale (unsigned int i) const |
void | SetX (unsigned int i, double x) |
Protected Member Functions | |
GSLSimAnFunc () | |
derived classes might need to re-define completely the class More... | |
Private Attributes | |
std::vector< double > | fX |
std::vector< double > | fScale |
const ROOT::Math::IMultiGenFunction * | fFunc |
#include <Math/GSLSimAnnealing.h>
ROOT::Math::GSLSimAnFunc::GSLSimAnFunc | ( | const ROOT::Math::IMultiGenFunction & | func, |
const double * | x | ||
) |
construct from an interface of a multi-dimensional function
Definition at line 34 of file GSLSimAnnealing.cxx.
ROOT::Math::GSLSimAnFunc::GSLSimAnFunc | ( | const ROOT::Math::IMultiGenFunction & | func, |
const double * | x, | ||
const double * | scale | ||
) |
construct from an interface of a multi-dimensional function Use optionally a scale factor (for each coordinate) which can be used to scale the step sizes (this is used for example by the minimization algorithm)
Definition at line 43 of file GSLSimAnnealing.cxx.
|
inlineprotected |
derived classes might need to re-define completely the class
Definition at line 70 of file GSLSimAnnealing.h.
Referenced by Clone().
|
inlinevirtual |
virtual distructor (no operations)
Definition at line 78 of file GSLSimAnnealing.h.
|
inlinevirtual |
clone method.
Needs to be re-implemented by the derived classes for deep copying
Definition at line 92 of file GSLSimAnnealing.h.
Referenced by ROOT::Math::GSLSimAn::CopyCtor().
|
virtual |
calculate the distance (metric) between this one and another configuration Presently a cartesian metric is used.
re-implement by derived classes if needed to be modified
Definition at line 66 of file GSLSimAnnealing.cxx.
Referenced by ROOT::Math::GSLSimAn::Dist().
|
virtual |
evaluate the energy ( objective function value) re-implement by derived classes if needed to be modified
Definition at line 50 of file GSLSimAnnealing.cxx.
Referenced by ROOT::Math::GSLSimAn::E().
|
virtual |
fast copy method called by GSL simuated annealing internally copy only the things which have been changed must be re-implemented by derived classes if needed
Definition at line 96 of file GSLSimAnnealing.cxx.
Referenced by ROOT::Math::GSLSimAn::Copy().
|
inline |
Definition at line 135 of file GSLSimAnnealing.h.
|
virtual |
print the position in the standard output std::ostream GSL prints in addition n iteration, n function calls, temperature and energy re-implement by derived classes if necessary
Definition at line 83 of file GSLSimAnnealing.cxx.
Referenced by ROOT::Math::GSLSimAn::Print().
|
inline |
Definition at line 141 of file GSLSimAnnealing.h.
change the x values (used by sim annealing to take a step)
Definition at line 126 of file GSLSimAnnealing.h.
|
inline |
Definition at line 131 of file GSLSimAnnealing.h.
Definition at line 143 of file GSLSimAnnealing.h.
|
virtual |
change the x[i] value using a random value urndm generated between [0,1] up to a maximum value maxstep re-implement by derived classes if needed to be modified
Definition at line 55 of file GSLSimAnnealing.cxx.
Referenced by ROOT::Math::GSLSimAn::Step().
|
inline |
Definition at line 137 of file GSLSimAnnealing.h.
Referenced by Distance(), and ROOT::Math::GSLSimAnnealing::Solve().
|
inline |
Definition at line 139 of file GSLSimAnnealing.h.
|
private |
Definition at line 151 of file GSLSimAnnealing.h.
Referenced by Energy().
|
private |
Definition at line 150 of file GSLSimAnnealing.h.
Referenced by GSLSimAnFunc(), Scale(), and Step().
|
private |
Definition at line 149 of file GSLSimAnnealing.h.
Referenced by Distance(), Energy(), FastCopy(), NDim(), Print(), SetX(), Step(), and X().