Logo ROOT   6.08/07
Reference Guide
RootFinderAlgorithms.h
Go to the documentation of this file.
1 // @(#)root/mathmore:$Id$
2 // Author: L. Moneta, A. Zsenei 08/2005
3 
4  /**********************************************************************
5  * *
6  * Copyright (c) 2004 ROOT Foundation, 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 // Header file for GSL ROOT Finder Algorithms
26 //
27 // Created by: moneta at Sun Nov 14 14:07:50 2004
28 //
29 // Last update: Sun Nov 14 14:07:50 2004
30 //
31 #ifndef ROOT_Math_GSLRootFinderAlgorithms
32 #define ROOT_Math_GSLRootFinderAlgorithms
33 
34 
35 #ifndef ROOT_Math_GSLRootFinder
36 #include "Math/GSLRootFinder.h"
37 #endif
38 
39 #ifndef ROOT_Math_GSLRootFinderDeriv
41 #endif
42 
43 namespace ROOT {
44 namespace Math {
45 
46  /**
47  Root-Finding Algorithms
48 
49  */
50 
51 namespace Roots {
52 
53 //________________________________________________________________________________________________________
54  /**
55  Roots::Bisection
56  Bisection algorithm, simplest algorithm for bracketing the roots of a function, but slowest one.
57  See the <A HREF="http://www.gnu.org/software/gsl/manual/html_node/Root-Bracketing-Algorithms.html">GSL manual</A> for more information
58  @ingroup RootFinders
59  */
60 
61  class Bisection : public GSLRootFinder {
62 
63  public:
64 
65  Bisection();
66  virtual ~Bisection();
67 
68  private:
69  // usually copying is non trivial, so we make this unaccessible
70 
71  Bisection(const Bisection &);
72  Bisection & operator = (const Bisection &);
73 
74  };
75 
76 //________________________________________________________________________________________________________
77  /**
78  False Position algorithm based on linear interpolation.
79  See the <A HREF="http://www.gnu.org/software/gsl/manual/html_node/Root-Bracketing-Algorithms.html">GSL manual</A> for more information
80  @ingroup RootFinders
81  */
82 
83  class FalsePos : public GSLRootFinder {
84 
85  public:
86 
87  FalsePos();
88  virtual ~FalsePos();
89 
90  private:
91  // usually copying is non trivial, so we make this unaccessible
92  FalsePos(const FalsePos &);
93  FalsePos & operator = (const FalsePos &);
94 
95  };
96 
97 
98 
99 //________________________________________________________________________________________________________
100  /**
101  Brent-Dekker algorithm which combines an interpolation strategy with the bisection algorithm
102  See the <A HREF="http://www.gnu.org/software/gsl/manual/html_node/Root-Bracketing-Algorithms.html">
103  GSL manual</A> for more information
104 
105  @ingroup RootFinders
106  */
107 
108  class Brent : public GSLRootFinder {
109 
110  public:
111 
112  Brent();
113  virtual ~Brent();
114 
115  private:
116  // usually copying is non trivial, so we make this unaccessible
117  Brent(const Brent &);
118  Brent & operator = (const Brent &);
119 
120  };
121 
122 
123  //----------------------------------------------------------------------
124  // algorithm with derivatives
125  //----------------------------------------------------------------------
126 
127 //________________________________________________________________________________________________________
128  /**
129  a Newton algorithm, which computes the derivative at each iteration
130  See the <A HREF="http://www.gnu.org/software/gsl/manual/html_node/Root-Finding-Algorithms-using-Derivatives.html">
131  GSL manual</A> for more information
132 
133  @ingroup RootFinders
134  */
135 
136  class Newton : public GSLRootFinderDeriv {
137 
138  public:
139 
140  Newton();
141  virtual ~Newton();
142 
143  private:
144  // usually copying is non trivial, so we make this unaccessible
145  Newton(const Newton &);
146  Newton & operator = (const Newton &);
147 
148  };
149 
150 
151 //________________________________________________________________________________________________________
152  /**
153  \a Secant algorithm, simplified version of Newton method, which does not require the derivative at every step.
154  See the <A HREF="http://www.gnu.org/software/gsl/manual/html_node/Root-Finding-Algorithms-using-Derivatives.html">
155  GSL manual</A> for more information
156  @ingroup RootFinders
157  */
158 
159  class Secant : public GSLRootFinderDeriv {
160 
161  public:
162 
163  Secant();
164  virtual ~Secant();
165 
166  private:
167  // usually copying is non trivial, so we make this unaccessible
168  Secant(const Secant &);
169  Secant & operator = (const Secant &);
170 
171  };
172 
173 //________________________________________________________________________________________________________
174  /**
175  \a Steffenson method, providing the fastes convergence.
176  See the <A HREF="http://www.gnu.org/software/gsl/manual/html_node/Root-Finding-Algorithms-using-Derivatives.html">
177  GSL manual</A> for more information
178 
179  @ingroup RootFinders
180  */
181 
183 
184  public:
185 
186  Steffenson();
187  virtual ~Steffenson();
188 
189  private:
190  // usually copying is non trivial, so we make this unaccessible
191  Steffenson(const Steffenson &);
192  Steffenson & operator = (const Steffenson &);
193 
194  };
195 
196 
197 }
198 
199 } // namespace Math
200 } // namespace ROOT
201 
202 
203 #endif /* ROOT_Math_GSLRootFinderAlgorithms */
This namespace contains pre-defined functions to be used in conjuction with TExecutor::Map and TExecu...
Definition: StringConv.hxx:21
Secant algorithm, simplified version of Newton method, which does not require the derivative at every...
Base class for GSL Root-Finding algorithms for one dimensional functions which do not use function de...
Definition: GSLRootFinder.h:79
Steffenson method, providing the fastes convergence.
a Newton algorithm, which computes the derivative at each iteration See the GSL manual for more infor...
Roots::Bisection Bisection algorithm, simplest algorithm for bracketing the roots of a function...
False Position algorithm based on linear interpolation.
Bisection & operator=(const Bisection &)
Base class for GSL Root-Finding algorithms for one dimensional functions which use function derivativ...
Namespace for new Math classes and functions.
Brent-Dekker algorithm which combines an interpolation strategy with the bisection algorithm See the ...