Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
GSLMinimizer.h
Go to the documentation of this file.
1// @(#)root/mathmore:$Id$
2// Author: L. Moneta Wed Oct 18 11:48:00 2006
3
4 /**********************************************************************
5 * *
6 * Copyright (c) 2006 LCG ROOT Math Team, CERN/PH-SFT *
7 * *
8 * This library is free software; you can redistribute it and/or *
9 * modify it under the terms of the GNU General Public License *
10 * as published by the Free Software Foundation; either version 2 *
11 * of the License, or (at your option) any later version. *
12 * *
13 * This library is distributed in the hope that it will be useful, *
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
16 * General Public License for more details. *
17 * *
18 * You should have received a copy of the GNU General Public License *
19 * along with this library (see file COPYING); if not, write *
20 * to the Free Software Foundation, Inc., 59 Temple Place, Suite *
21 * 330, Boston, MA 02111-1307 USA, or contact the author. *
22 * *
23 **********************************************************************/
24
25
26// Header file for class GSLMinimizer
27
28#ifndef ROOT_Math_GSLMinimizer
29#define ROOT_Math_GSLMinimizer
30
31#include "Math/Minimizer.h"
32
33#include "Math/IFunctionfwd.h"
34
36
37#include "Math/BasicMinimizer.h"
38
39
40namespace ROOT {
41
42namespace Math {
43
44
45 /**
46 enumeration specifying the types of GSL minimizers
47 @ingroup MultiMin
48 */
55 };
56
57
58 class GSLMultiMinimizer;
59
60 class MinimTransformFunction;
61
62
63//_____________________________________________________________________________________
64/**
65 GSLMinimizer class.
66 Implementation of the ROOT::Math::Minimizer interface using the GSL multi-dimensional
67 minimization algorithms.
68
69 See <A HREF="http://www.gnu.org/software/gsl/manual/html_node/Multidimensional-Minimization.html">GSL doc</A>
70 from more info on the GSL minimization algorithms.
71
72 The class implements the ROOT::Math::Minimizer interface and can be instantiated using the
73 ROOT plugin manager (plugin name is "GSLMultiMin"). The various minimization algorithms
74 (conjugatefr, conjugatepr, bfgs, etc..) can be passed as enumerations and also as a string.
75 The default algorithm is conjugatefr (Fletcher-Reeves conjugate gradient algorithm).
76
77 @ingroup MultiMin
78*/
80
81public:
82
83 /**
84 Default constructor
85 */
87
88 /**
89 Constructor with a string giving name of algorithm
90 */
91 GSLMinimizer (const char * type );
92
93 /**
94 Destructor
95 */
96 ~GSLMinimizer () override;
97
98 /// set the function to minimize
99 void SetFunction(const ROOT::Math::IMultiGenFunction & func) override;
100
101
102 /// method to perform the minimization
103 bool Minimize() override;
104
105
106 /// return expected distance reached from the minimum
107 double Edm() const override { return 0; } // not impl. }
108
109
110 /// return pointer to gradient values at the minimum
111 const double * MinGradient() const override;
112
113 /// number of function calls to reach the minimum
114 unsigned int NCalls() const override;
115
116
117 /// minimizer provides error and error matrix
118 bool ProvidesError() const override { return false; }
119
120 /// return errors at the minimum
121 const double * Errors() const override { return nullptr; }
122
123 /** return covariance matrices elements
124 if the variable is fixed the matrix is zero
125 The ordering of the variables is the same as in errors
126 */
127 double CovMatrix(unsigned int , unsigned int ) const override { return 0; }
128
129
130
131
132protected:
133
134private:
135
136
138
139 double fLSTolerance; // Line Search Tolerance
140
141};
142
143 } // end namespace Fit
144
145} // end namespace ROOT
146
147
148
149#endif /* ROOT_Math_GSLMinimizer */
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 Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
Base Minimizer class, which defines the basic functionality of various minimizer implementations (apa...
GSLMinimizer class.
const double * MinGradient() const override
return pointer to gradient values at the minimum
const double * Errors() const override
return errors at the minimum
ROOT::Math::GSLMultiMinimizer * fGSLMultiMin
double Edm() const override
return expected distance reached from the minimum
void SetFunction(const ROOT::Math::IMultiGenFunction &func) override
set the function to minimize
~GSLMinimizer() override
Destructor.
unsigned int NCalls() const override
number of function calls to reach the minimum
double CovMatrix(unsigned int, unsigned int) const override
return covariance matrices elements if the variable is fixed the matrix is zero The ordering of the v...
bool ProvidesError() const override
minimizer provides error and error matrix
bool Minimize() override
method to perform the minimization
GSLMultiMinimizer class , for minimizing multi-dimensional function using derivatives.
Documentation for the abstract class IBaseFunctionMultiDim.
Definition IFunction.h:61
EGSLMinimizerType
enumeration specifying the types of GSL minimizers
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...