|
||||
File indexing completed on 2025-01-18 10:10:21
0001 // @(#)root/mathmore:$Id$ 0002 // Author: L. Moneta, A. Zsenei 08/2005 0003 0004 /********************************************************************** 0005 * * 0006 * Copyright (c) 2004 ROOT Foundation, 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 // Header file for GSL ROOT Finder Algorithms 0026 // 0027 // Created by: moneta at Sun Nov 14 14:07:50 2004 0028 // 0029 // Last update: Sun Nov 14 14:07:50 2004 0030 // 0031 #ifndef ROOT_Math_GSLRootFinderAlgorithms 0032 #define ROOT_Math_GSLRootFinderAlgorithms 0033 0034 0035 #include "Math/GSLRootFinder.h" 0036 0037 #include "Math/GSLRootFinderDeriv.h" 0038 0039 namespace ROOT { 0040 namespace Math { 0041 0042 /** 0043 Root-Finding Algorithms 0044 0045 */ 0046 0047 namespace Roots { 0048 0049 //________________________________________________________________________________________________________ 0050 /** 0051 Roots::Bisection 0052 Bisection algorithm, simplest algorithm for bracketing the roots of a function, but slowest one. 0053 See the <A HREF="http://www.gnu.org/software/gsl/manual/html_node/Root-Bracketing-Algorithms.html">GSL manual</A> for more information 0054 @ingroup RootFinders 0055 */ 0056 0057 class Bisection : public GSLRootFinder { 0058 0059 public: 0060 0061 Bisection(); 0062 ~Bisection() override; 0063 0064 private: 0065 // usually copying is non trivial, so we make this unaccessible 0066 0067 Bisection(const Bisection &); 0068 Bisection & operator = (const Bisection &); 0069 0070 }; 0071 0072 //________________________________________________________________________________________________________ 0073 /** 0074 False Position algorithm based on linear interpolation. 0075 See the <A HREF="http://www.gnu.org/software/gsl/manual/html_node/Root-Bracketing-Algorithms.html">GSL manual</A> for more information 0076 @ingroup RootFinders 0077 */ 0078 0079 class FalsePos : public GSLRootFinder { 0080 0081 public: 0082 0083 FalsePos(); 0084 ~FalsePos() override; 0085 0086 private: 0087 // usually copying is non trivial, so we make this unaccessible 0088 FalsePos(const FalsePos &); 0089 FalsePos & operator = (const FalsePos &); 0090 0091 }; 0092 0093 0094 0095 //________________________________________________________________________________________________________ 0096 /** 0097 Brent-Dekker algorithm which combines an interpolation strategy with the bisection algorithm 0098 See the <A HREF="http://www.gnu.org/software/gsl/manual/html_node/Root-Bracketing-Algorithms.html"> 0099 GSL manual</A> for more information 0100 0101 @ingroup RootFinders 0102 */ 0103 0104 class Brent : public GSLRootFinder { 0105 0106 public: 0107 0108 Brent(); 0109 ~Brent() override; 0110 0111 private: 0112 // usually copying is non trivial, so we make this unaccessible 0113 Brent(const Brent &); 0114 Brent & operator = (const Brent &); 0115 0116 }; 0117 0118 0119 //---------------------------------------------------------------------- 0120 // algorithm with derivatives 0121 //---------------------------------------------------------------------- 0122 0123 //________________________________________________________________________________________________________ 0124 /** 0125 a Newton algorithm, which computes the derivative at each iteration 0126 See the <A HREF="http://www.gnu.org/software/gsl/manual/html_node/Root-Finding-Algorithms-using-Derivatives.html"> 0127 GSL manual</A> for more information 0128 0129 @ingroup RootFinders 0130 */ 0131 0132 class Newton : public GSLRootFinderDeriv { 0133 0134 public: 0135 0136 Newton(); 0137 ~Newton() override; 0138 0139 private: 0140 // usually copying is non trivial, so we make this unaccessible 0141 Newton(const Newton &); 0142 Newton & operator = (const Newton &); 0143 0144 }; 0145 0146 0147 //________________________________________________________________________________________________________ 0148 /** 0149 \a Secant algorithm, simplified version of Newton method, which does not require the derivative at every step. 0150 See the <A HREF="http://www.gnu.org/software/gsl/manual/html_node/Root-Finding-Algorithms-using-Derivatives.html"> 0151 GSL manual</A> for more information 0152 @ingroup RootFinders 0153 */ 0154 0155 class Secant : public GSLRootFinderDeriv { 0156 0157 public: 0158 0159 Secant(); 0160 ~Secant() override; 0161 0162 private: 0163 // usually copying is non trivial, so we make this unaccessible 0164 Secant(const Secant &); 0165 Secant & operator = (const Secant &); 0166 0167 }; 0168 0169 //________________________________________________________________________________________________________ 0170 /** 0171 \a Steffenson method, providing the fastes convergence. 0172 See the <A HREF="http://www.gnu.org/software/gsl/manual/html_node/Root-Finding-Algorithms-using-Derivatives.html"> 0173 GSL manual</A> for more information 0174 0175 @ingroup RootFinders 0176 */ 0177 0178 class Steffenson : public GSLRootFinderDeriv { 0179 0180 public: 0181 0182 Steffenson(); 0183 ~Steffenson() override; 0184 0185 private: 0186 // usually copying is non trivial, so we make this unaccessible 0187 Steffenson(const Steffenson &); 0188 Steffenson & operator = (const Steffenson &); 0189 0190 }; 0191 0192 0193 } 0194 0195 } // namespace Math 0196 } // namespace ROOT 0197 0198 0199 #endif /* ROOT_Math_GSLRootFinderAlgorithms */
[ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |