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()
Default constructor.
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 Distance(const GSLSimAnFunc &func) const
calculate the distance (metric) between this one and another configuration Presently a cartesian metr...
unsigned int NDim() const
int Solve(const ROOT::Math::IMultiGenFunction &func, const double *x0, const double *scale, double *xmin, bool debug=false)
solve the simulated annealing given a multi-dim function, the initial vector parameters and a vector ...
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
virtual double Energy() const
evaluate the energy ( objective function value) re-implement by derived classes if needed to be modif...
GSLSimAnnealing(const GSLSimAnnealing &)
Copy constructor.
void SetX(const double *x)
change the x values (used by sim annealing to take a step)
std::vector< double > fScale
const GSLSimAnParams & Params() const
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
double func(double *x, double *p)
Namespace for new Math classes and functions.
virtual GSLSimAnFunc * Clone() const
clone method.
double Scale(unsigned int i) const
GSLSimAnnealing & operator=(const GSLSimAnnealing &rhs)
Assignment operator.
~GSLSimAnnealing()
Destructor (no operations)
const std::vector< double > & X() const
Documentation for the abstract class IBaseFunctionMultiDim.
virtual ~GSLSimAnFunc()
virtual distructor (no operations)
structure holding the simulated annealing parameters
void SetX(IT begin, IT end)
double X(unsigned int i) const