27 #ifndef ROOT_Math_GSLSimAnnealing 28 #define ROOT_Math_GSLSimAnnealing 38 class GSLRandomEngine;
100 virtual double Energy()
const;
121 virtual void Print();
127 std::copy(x, x+
fX.size(),
fX.begin() );
132 std::copy(begin, end,
fX.begin() );
135 unsigned int NDim()
const {
return fX.size(); }
137 double X(
unsigned int i)
const {
return fX[i]; }
139 const std::vector<double> &
X()
const {
return fX; }
143 void SetX(
unsigned int i,
double x) {
fX[i] =
x; }
149 std::vector<double>
fX;
219 if (
this == &rhs)
return *
this;
GSLSimAnnealing class for performing a simulated annealing search of a multidimensional function...
GSLSimAnParams & Params()
Namespace for new ROOT classes and functions.
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 maxste...
const ROOT::Math::IMultiGenFunction * fFunc
GSLSimAnFunc class description.
virtual double Energy() const
evaluate the energy ( objective function value) re-implement by derived classes if needed to be modif...
virtual GSLSimAnFunc * Clone() const
clone method.
virtual double Distance(const GSLSimAnFunc &func) const
calculate the distance (metric) between this one and another configuration Presently a cartesian metr...
double k
parameters for the Boltzman distribution
GSLRandomEngine Base class for all GSL random engines, normally user instantiate the derived classes ...
void SetX(unsigned int i, double x)
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
double Scale(unsigned int i) const
double X(unsigned int i) const
Documentation for the abstract class IBaseFunctionMultiDim.
GSLSimAnnealing(const GSLSimAnnealing &)
Copy constructor.
void SetX(const double *x)
change the x values (used by sim annealing to take a step)
unsigned int NDim() const
std::vector< double > fScale
virtual GSLSimAnFunc & FastCopy(const GSLSimAnFunc &f)
fast copy method called by GSL simuated annealing internally copy only the things which have been cha...
GSLSimAnFunc()
derived classes might need to re-define completely the class
const GSLSimAnParams & Params() const
Namespace for new Math classes and functions.
Binding & operator=(OUT(*fun)(void))
~GSLSimAnnealing()
Destructor (no operations)
virtual ~GSLSimAnFunc()
virtual distructor (no operations)
const std::vector< double > & X() const
structure holding the simulated annealing parameters
void SetX(IT begin, IT end)