Logo ROOT   6.18/05
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
21namespace TMVA {
22 class IFitterTarget;
23 class Interval;
24}
25
26namespace 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
62public:
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
96
98
99 virtual void SetOptions(const ROOT::Math::MinimizerOptions & opt);
100
101protected:
102
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 */
int Int_t
Definition: RtypesCore.h:41
double Double_t
Definition: RtypesCore.h:55
char name[80]
Definition: TGX11.cxx:109
virtual bool ProvidesError() const
minimizer provides error and error matrix
virtual double Edm() const
return expected distance reached from the minimum (re-implement if minimizer provides it
virtual const double * X() const
return pointer to X values at the minimum
const GeneticMinimizerParameters & MinimizerParameters() const
virtual void SetOptions(const ROOT::Math::MinimizerOptions &opt)
virtual const double * Errors() const
return errors at the minimum
virtual unsigned int NFree() const
number of free variables (real dimension of the problem) this is <= Function().NDim() which is the to...
virtual double MinValue() const
return minimum function value
virtual bool SetVariable(unsigned int ivar, const std::string &name, double val, double step)
set a new free variable
void GetGeneticOptions(ROOT::Math::MinimizerOptions &opt) const
virtual void Clear()
reset for consecutive minimizations - implement if needed
virtual double CovMatrix(unsigned int i, unsigned int j) const
return covariance matrices element for variables ivar,jvar if the variable is fixed the return value ...
std::vector< double > fResult
TMVA::IFitterTarget * fFitness
virtual bool Minimize()
method to perform the minimization
std::vector< TMVA::Interval * > fRanges
virtual bool SetFixedVariable(unsigned int ivar, const std::string &name, double val)
set a new fixed variable (override if minimizer supports them )
virtual bool SetLimitedVariable(unsigned int, const std::string &, double, double, double, double)
set a new upper/lower limited variable (override if minimizer supports them ) otherwise as default se...
virtual unsigned int NCalls() const
number of function calls to reach the minimum
void SetParameters(const GeneticMinimizerParameters &params)
virtual const double * MinGradient() const
return pointer to gradient values at the minimum
virtual ROOT::Math::MinimizerOptions Options() const
retrieve the minimizer options (implement derived class if needed)
GeneticMinimizerParameters fParameters
virtual void SetFunction(const ROOT::Math::IMultiGenFunction &func)
set the function to minimize
virtual unsigned int NDim() const
this is <= Function().NDim() which is the total number of variables (free+ constrained ones)
Documentation for the abstract class IBaseFunctionMultiDim.
Definition: IFunction.h:62
Abstract Minimizer class, defining the interface for the various minimizer (like Minuit2,...
Definition: Minimizer.h:78
virtual void SetFunction(const ROOT::Math::IMultiGenFunction &func)=0
set the function to minimize
Interface for a fitter 'target'.
Definition: IFitterTarget.h:44
The TMVA::Interval Class.
Definition: Interval.h:61
Namespace for new Math classes and functions.
Namespace for new ROOT classes and functions.
Definition: StringConv.hxx:21
create variable transformations