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; }
149 std::vector<double>
fX;
219 if (
this == &rhs)
return *
this;
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t r
GSLRandomEngine Base class for all GSL random engines, normally user instantiate the derived classes ...
GSLSimAnFunc class description.
void SetX(IT begin, IT end)
double X(unsigned int i) const
double Scale(unsigned int i) const
const std::vector< double > & X() const
virtual double Distance(const GSLSimAnFunc &func) const
calculate the distance (metric) between this one and another configuration Presently a cartesian metr...
virtual void Print()
print the position in the standard output std::ostream GSL prints in addition n iteration,...
GSLSimAnFunc()
derived classes might need to re-define completely the class
virtual ~GSLSimAnFunc()
virtual destructor (no operations)
unsigned int NDim() const
virtual GSLSimAnFunc & FastCopy(const GSLSimAnFunc &f)
fast copy method called by GSL simulated annealing internally copy only the things which have been ch...
void SetX(const double *x)
change the x values (used by sim annealing to take a step)
virtual double Energy() const
evaluate the energy ( objective function value) re-implement by derived classes if needed to be modif...
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...
void SetX(unsigned int i, double x)
virtual GSLSimAnFunc * Clone() const
clone method.
std::vector< double > fScale
const ROOT::Math::IMultiGenFunction * fFunc
GSLSimAnnealing class for performing a simulated annealing search of a multidimensional function.
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 ...
GSLSimAnnealing & operator=(const GSLSimAnnealing &rhs)
Assignment operator.
const GSLSimAnParams & Params() const
void SetParams(const GSLSimAnParams ¶ms)
GSLSimAnnealing(const GSLSimAnnealing &)
Copy constructor.
GSLSimAnnealing()
Default constructor.
~GSLSimAnnealing()
Destructor (no operations)
GSLSimAnParams & Params()
Documentation for the abstract class IBaseFunctionMultiDim.
Namespace for new Math classes and functions.
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...
structure holding the simulated annealing parameters
double k
parameters for the Boltzman distribution