![]() |
|
|||
Warning, file /include/root/Math/GSLMinimizer.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001 // @(#)root/mathmore:$Id$ 0002 // Author: L. Moneta Wed Oct 18 11:48:00 2006 0003 0004 /********************************************************************** 0005 * * 0006 * Copyright (c) 2006 LCG ROOT Math Team, CERN/PH-SFT * 0007 * * 0008 * This library is free software; you can redistribute it and/or * 0009 * modify it under the terms of the GNU General Public License * 0010 * as published by the Free Software Foundation; either version 2 * 0011 * of the License, or (at your option) any later version. * 0012 * * 0013 * This library is distributed in the hope that it will be useful, * 0014 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 0015 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * 0016 * General Public License for more details. * 0017 * * 0018 * You should have received a copy of the GNU General Public License * 0019 * along with this library (see file COPYING); if not, write * 0020 * to the Free Software Foundation, Inc., 59 Temple Place, Suite * 0021 * 330, Boston, MA 02111-1307 USA, or contact the author. * 0022 * * 0023 **********************************************************************/ 0024 0025 0026 // Header file for class GSLMinimizer 0027 0028 #ifndef ROOT_Math_GSLMinimizer 0029 #define ROOT_Math_GSLMinimizer 0030 0031 #include "Math/Minimizer.h" 0032 0033 #include "Math/IFunctionfwd.h" 0034 0035 #include "Math/IParamFunctionfwd.h" 0036 0037 #include "Math/BasicMinimizer.h" 0038 0039 0040 namespace ROOT { 0041 0042 namespace Math { 0043 0044 0045 /** 0046 enumeration specifying the types of GSL minimizers 0047 @ingroup MultiMin 0048 */ 0049 enum EGSLMinimizerType { 0050 kConjugateFR, 0051 kConjugatePR, 0052 kVectorBFGS, 0053 kVectorBFGS2, 0054 kSteepestDescent 0055 }; 0056 0057 0058 class GSLMultiMinimizer; 0059 0060 class MinimTransformFunction; 0061 0062 0063 //_____________________________________________________________________________________ 0064 /** 0065 GSLMinimizer class. 0066 Implementation of the ROOT::Math::Minimizer interface using the GSL multi-dimensional 0067 minimization algorithms. 0068 0069 See <A HREF="http://www.gnu.org/software/gsl/manual/html_node/Multidimensional-Minimization.html">GSL doc</A> 0070 from more info on the GSL minimization algorithms. 0071 0072 The class implements the ROOT::Math::Minimizer interface and can be instantiated using the 0073 ROOT plugin manager (plugin name is "GSLMultiMin"). The various minimization algorithms 0074 (conjugatefr, conjugatepr, bfgs, etc..) can be passed as enumerations and also as a string. 0075 The default algorithm is conjugatefr (Fletcher-Reeves conjugate gradient algorithm). 0076 0077 @ingroup MultiMin 0078 */ 0079 class GSLMinimizer : public ROOT::Math::BasicMinimizer { 0080 0081 public: 0082 0083 /** 0084 Default constructor 0085 */ 0086 GSLMinimizer (ROOT::Math::EGSLMinimizerType type = ROOT::Math::kConjugateFR ); 0087 0088 /** 0089 Constructor with a string giving name of algorithm 0090 */ 0091 GSLMinimizer (const char * type ); 0092 0093 /** 0094 Destructor 0095 */ 0096 ~GSLMinimizer () override; 0097 0098 /// set the function to minimize 0099 void SetFunction(const ROOT::Math::IMultiGenFunction & func) override; 0100 0101 0102 /// method to perform the minimization 0103 bool Minimize() override; 0104 0105 0106 /// return expected distance reached from the minimum 0107 double Edm() const override { return 0; } // not impl. } 0108 0109 0110 /// return pointer to gradient values at the minimum 0111 const double * MinGradient() const override; 0112 0113 /// number of function calls to reach the minimum 0114 unsigned int NCalls() const override; 0115 0116 0117 /// minimizer provides error and error matrix 0118 bool ProvidesError() const override { return false; } 0119 0120 /// return errors at the minimum 0121 const double * Errors() const override { return nullptr; } 0122 0123 /** return covariance matrices elements 0124 if the variable is fixed the matrix is zero 0125 The ordering of the variables is the same as in errors 0126 */ 0127 double CovMatrix(unsigned int , unsigned int ) const override { return 0; } 0128 0129 0130 0131 0132 protected: 0133 0134 private: 0135 0136 0137 ROOT::Math::GSLMultiMinimizer * fGSLMultiMin; 0138 0139 double fLSTolerance; // Line Search Tolerance 0140 0141 }; 0142 0143 } // end namespace Fit 0144 0145 } // end namespace ROOT 0146 0147 0148 0149 #endif /* ROOT_Math_GSLMinimizer */
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
![]() ![]() |