class ROOT::Math::GSLSimAnFunc


   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

   @ingroup MultiMin

Function Members (Methods)

public:
virtual~GSLSimAnFunc()
virtual ROOT::Math::GSLSimAnFunc*Clone() const
virtual doubleDistance(const ROOT::Math::GSLSimAnFunc& func) const
virtual doubleEnergy() const
virtual ROOT::Math::GSLSimAnFunc&FastCopy(const ROOT::Math::GSLSimAnFunc& f)
ROOT::Math::GSLSimAnFuncGSLSimAnFunc(const ROOT::Math::GSLSimAnFunc&)
ROOT::Math::GSLSimAnFuncGSLSimAnFunc(const ROOT::Math::IMultiGenFunction& func, const double* x)
ROOT::Math::GSLSimAnFuncGSLSimAnFunc(const ROOT::Math::IMultiGenFunction& func, const double* x, const double* scale)
unsigned intNDim() const
virtual voidPrint()
doubleScale(unsigned int i) const
voidSetX(const double* x)
voidSetX(unsigned int i, double x)
virtual voidStep(const ROOT::Math::GSLRandomEngine& r, double maxstep)
const vector<double>&X() const
doubleX(unsigned int i) const
protected:
ROOT::Math::GSLSimAnFuncGSLSimAnFunc()

Data Members

private:
const ROOT::Math::IMultiGenFunction*fFunc
vector<double>fScale
vector<double>fX

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

GSLSimAnFunc(const ROOT::Math::IMultiGenFunction& func, const double* x)
      construct from an interface of a multi-dimensional function

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)

GSLSimAnFunc(const ROOT::Math::GSLSimAnFunc& )
      derived classes might need to re-define completly the class

{}
virtual ~GSLSimAnFunc()
 virtual distructor (no operations)
{ }
GSLSimAnFunc & FastCopy(const ROOT::Math::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

GSLSimAnFunc * Clone()
      clone method. Needs to be re-implemented by the derived classes for deep  copying

return new GSLSimAnFunc(const ROOT::Math::GSLSimAnFunc& )
double Energy()
      evaluate the energy ( objective function value)
      re-implement by derived classes if needed to be modified

void Step(const ROOT::Math::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

double Distance(const ROOT::Math::GSLSimAnFunc& func) const
      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

void Print()
      print the position in the standard output ostream
      GSL prints in addition n iteration, n function calls, temperature and energy
      re-implement by derived classes if necessary

void SetX(const double* x)
       change the x values (used by sim annealing to take a step)

void SetX(unsigned int i, double x)
unsigned int NDim()
{ return fX.size(); }
double X(unsigned int i) const
{ return fX[i]; }
const std::vector<double> & X(unsigned int i) const
{ return fX; }
double Scale(unsigned int i) const
{ return fScale[i]; }

Author: L. Moneta Thu Jan 25 11:13:48 2007
Last change: root/mathmore:$Id: GSLSimAnnealing.h 21553 2007-12-21 10:55:46Z moneta $
Last generated: 2008-06-25 08:29
Copyright (c) 2006 LCG ROOT Math Team, CERN/PH-SFT *

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.