Logo ROOT   6.10/09
Reference Guide
GeneticMinimizer.h
Go to the documentation of this file.
1 // @(#)root/mathcore:$Id
2 
3 /**********************************************************************
4  * *
5  * Copyright (c) 2006 LCG ROOT Math Team, CERN/PH-SFT *
6  * *
7  * *
8  **********************************************************************/
9 
10 // Header file for class GeneticMinimizer
11 
12 #ifndef ROOT_Math_GeneticMinimizer
13 #define ROOT_Math_GeneticMinimizer
14 
15 #include "Math/Minimizer.h"
16 
17 #include "RtypesCore.h"
18 
19 #include <vector>
20 
21 namespace TMVA {
22  class IFitterTarget;
23  class Interval;
24 }
25 
26 namespace ROOT {
27  namespace Math {
28 
29 
30 //_______________________________________________________________________________
31 /*
32  structure containing the parameters of the genetic minimizer
33  */
35 
44 
45 
46  // constructor with default value
48 };
49 
50 
51 
52 //_______________________________________________________________________________
53 /**
54  GeneticMinimizer
55 
56  Minimizer class based on the Gentic algorithm implemented in TMVA
57 
58  @ingroup MultiMin
59 */
61 
62 public:
63 
64  //GeneticMinimizer (int = 0);
65  GeneticMinimizer (int i = 0);
66  virtual ~GeneticMinimizer ();
67 
68  virtual void Clear();
70  virtual void SetFunction(const ROOT::Math::IMultiGenFunction & func);
71 
72  virtual bool SetLimitedVariable(unsigned int , const std::string& , double , double , double, double);
73  virtual bool SetVariable(unsigned int ivar, const std::string & name, double val, double step);
74  virtual bool SetFixedVariable(unsigned int ivar , const std::string & name , double val);
75 
76  virtual bool Minimize();
77  virtual double MinValue() const;
78  virtual double Edm() const;
79  virtual const double * X() const;
80  virtual const double * MinGradient() const;
81  virtual unsigned int NCalls() const;
82 
83  virtual unsigned int NDim() const;
84  virtual unsigned int NFree() const;
85 
86  virtual bool ProvidesError() const;
87  virtual const double * Errors() const;
88 
89  virtual double CovMatrix(unsigned int i, unsigned int j) const;
90 
91  void SetParameters(const GeneticMinimizerParameters & params );
92 
93  void SetRandomSeed(int seed) { fParameters.fSeed = seed; }
94 
95  const GeneticMinimizerParameters & MinimizerParameters() const { return fParameters; }
96 
97  virtual ROOT::Math::MinimizerOptions Options() const;
98 
99  virtual void SetOptions(const ROOT::Math::MinimizerOptions & opt);
100 
101 protected:
102 
103  void GetGeneticOptions(ROOT::Math::MinimizerOptions & opt) const;
104 
105  std::vector<TMVA::Interval*> fRanges;
107  double fMinValue;
108  std::vector<double> fResult;
109 
111 
112 };
113 
114 
115  } // end namespace Math
116 } // end namespace ROOT
117 
118 #endif /* ROOT_Math_GeneticMinimizer */
GeneticMinimizerParameters fParameters
Namespace for new ROOT classes and functions.
Definition: StringConv.hxx:21
int Int_t
Definition: RtypesCore.h:41
void SetParameters(TFitEditor::FuncParams_t &pars, TF1 *func)
Restore the parameters from pars into the function.
Definition: TFitEditor.cxx:287
Abstract Minimizer class, defining the interface for the various minimizer (like Minuit2, Minuit, GSL, etc..) Plug-in&#39;s exist in ROOT to be able to instantiate the derived classes like ROOT::Math::GSLMinimizer or ROOT::Math::Minuit2Minimizer via the plug-in manager.
Definition: Minimizer.h:78
std::vector< double > fResult
Documentation for the abstract class IBaseFunctionMultiDim.
Definition: IFunction.h:62
virtual void SetFunction(const ROOT::Math::IMultiGenFunction &func)=0
set the function to minimize
The TMVA::Interval Class.
Definition: Interval.h:61
TMVA::IFitterTarget * fFitness
std::vector< TMVA::Interval * > fRanges
const GeneticMinimizerParameters & MinimizerParameters() const
double Double_t
Definition: RtypesCore.h:55
double func(double *x, double *p)
Definition: stressTF1.cxx:213
Namespace for new Math classes and functions.
Abstract ClassifierFactory template that handles arbitrary types.
Interface for a fitter &#39;target&#39;.
Definition: IFitterTarget.h:44