ROOT 6.08/07 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 * | Clone () const |
clone method. 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 double | Energy () const |
evaluate the energy ( objective function value) re-implement by derived classes if needed to be modified 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... | |
unsigned int | NDim () const |
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... | |
double | Scale (unsigned int i) const |
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) |
void | SetX (unsigned int i, double x) |
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... | |
double | X (unsigned int i) const |
const std::vector< double > & | X () const |
Protected Member Functions | |
GSLSimAnFunc () | |
derived classes might need to re-define completely the class More... | |
Private Attributes | |
const ROOT::Math::IMultiGenFunction * | fFunc |
std::vector< double > | fScale |
std::vector< double > | fX |
#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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
inline |
Definition at line 141 of file GSLSimAnnealing.h.
|
inline |
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.
|
inline |
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.
|
inline |
Definition at line 137 of file GSLSimAnnealing.h.
|
inline |
Definition at line 139 of file GSLSimAnnealing.h.
|
private |
Definition at line 151 of file GSLSimAnnealing.h.
|
private |
Definition at line 150 of file GSLSimAnnealing.h.
|
private |
Definition at line 149 of file GSLSimAnnealing.h.