![]() |
ROOT
6.06/09
Reference Guide
|
Base class for GSL Root-Finding algorithms for one dimensional functions which do not use function derivatives.
For finding the roots users should not use this class directly but instantiate the derived classes, for example ROOT::Math::Roots::Brent for using the Brent algorithm. All the classes defining the alhorithms are defined in the header Math/RootFinderAlgorithm.h They possible types implementing root bracketing algorithms which they do not require function derivatives are:
See also the specific classes for the documentation. See the GSL online manual for information on the GSL Root-Finding algorithms
Definition at line 79 of file GSLRootFinder.h.
Public Types | |
typedef double(* | GSLFuncPointer) (double, void *) |
Public Member Functions | |
GSLRootFinder () | |
virtual | ~GSLRootFinder () |
bool | SetFunction (const IGenFunction &f, double xlow, double xup) |
Sets the function for the rest of the algorithms. More... | |
bool | SetFunction (GSLFuncPointer f, void *params, double xlow, double xup) |
int | Iterate () |
This method is implemented only by the GSLRootFinder and GSLRootFinderDeriv classes and will return an error if it's not one of them. More... | |
double | Root () const |
Returns the previously calculated root. More... | |
bool | Solve (int maxIter=100, double absTol=1E-8, double relTol=1E-10) |
Find the root. More... | |
int | Iterations () const |
Return number of iterations. More... | |
int | Status () const |
Return the status of last root finding. More... | |
const char * | Name () const |
double GSLRootFinder::XLower() const { return fXlow; } More... | |
![]() | |
virtual | ~IRootFinderMethod () |
Default Destructor. More... | |
IRootFinderMethod () | |
Default Constructor. More... | |
virtual bool | SetFunction (const ROOT::Math::IGradFunction &, double) |
Sets the function for algorithms using derivatives. More... | |
Protected Member Functions | |
void | SetSolver (GSLRootFSolver *s) |
void | FreeSolver () |
Private Member Functions | |
GSLRootFinder (const GSLRootFinder &) | |
GSLRootFinder & | operator= (const GSLRootFinder &) |
Private Attributes | |
GSLFunctionWrapper * | fFunction |
GSLRootFSolver * | fS |
double | fRoot |
double | fXlow |
double | fXup |
int | fIter |
int | fStatus |
bool | fValidInterval |
#include <Math/GSLRootFinder.h>
Definition at line 102 of file GSLRootFinder.h.
ROOT::Math::GSLRootFinder::GSLRootFinder | ( | ) |
Definition at line 49 of file GSLRootFinder.cxx.
|
virtual |
Definition at line 59 of file GSLRootFinder.cxx.
|
private |
Definition at line 65 of file GSLRootFinder.cxx.
|
protected |
Definition at line 113 of file GSLRootFinder.cxx.
Referenced by ROOT::Math::Roots::Bisection::~Bisection(), ROOT::Math::Roots::Brent::~Brent(), and ROOT::Math::Roots::FalsePos::~FalsePos().
|
virtual |
This method is implemented only by the GSLRootFinder and GSLRootFinderDeriv classes and will return an error if it's not one of them.
Reimplemented from ROOT::Math::IRootFinderMethod.
Definition at line 118 of file GSLRootFinder.cxx.
Referenced by Solve().
|
inlinevirtual |
Return number of iterations.
Reimplemented from ROOT::Math::IRootFinderMethod.
Definition at line 120 of file GSLRootFinder.h.
|
virtual |
double GSLRootFinder::XLower() const { return fXlow; }
double GSLRootFinder::XUpper() const { return fXup; }
Implements ROOT::Math::IRootFinderMethod.
Definition at line 159 of file GSLRootFinder.cxx.
|
private |
Definition at line 69 of file GSLRootFinder.cxx.
|
virtual |
Returns the previously calculated root.
Implements ROOT::Math::IRootFinderMethod.
Definition at line 146 of file GSLRootFinder.cxx.
|
virtual |
Sets the function for the rest of the algorithms.
The parameters set the interval where the root has to be calculated.
Reimplemented from ROOT::Math::IRootFinderMethod.
Definition at line 93 of file GSLRootFinder.cxx.
Referenced by testGSLRootFinder().
bool ROOT::Math::GSLRootFinder::SetFunction | ( | GSLFuncPointer | f, |
void * | params, | ||
double | xlow, | ||
double | xup | ||
) |
Definition at line 77 of file GSLRootFinder.cxx.
|
protected |
Definition at line 108 of file GSLRootFinder.cxx.
Referenced by ROOT::Math::Roots::Bisection::Bisection(), ROOT::Math::Roots::Brent::Brent(), and ROOT::Math::Roots::FalsePos::FalsePos().
|
virtual |
Find the root.
Implements ROOT::Math::IRootFinderMethod.
Definition at line 164 of file GSLRootFinder.cxx.
|
inlinevirtual |
Return the status of last root finding.
Implements ROOT::Math::IRootFinderMethod.
Definition at line 125 of file GSLRootFinder.h.
|
private |
Definition at line 139 of file GSLRootFinder.h.
Referenced by GSLRootFinder(), Iterate(), SetFunction(), and ~GSLRootFinder().
|
private |
Definition at line 145 of file GSLRootFinder.h.
Referenced by Iterations(), and Solve().
|
private |
Definition at line 142 of file GSLRootFinder.h.
|
private |
Definition at line 140 of file GSLRootFinder.h.
Referenced by FreeSolver(), Iterate(), Name(), SetFunction(), and SetSolver().
|
private |
Definition at line 146 of file GSLRootFinder.h.
Referenced by SetFunction(), Solve(), and Status().
|
private |
Definition at line 147 of file GSLRootFinder.h.
Referenced by Iterate(), and SetFunction().
|
private |
Definition at line 143 of file GSLRootFinder.h.
Referenced by Iterate(), SetFunction(), and Solve().
|
private |
Definition at line 144 of file GSLRootFinder.h.
Referenced by Iterate(), SetFunction(), and Solve().