ROOT 6.10/09 Reference Guide |
Base class for GSL Root-Finding algorithms for one dimensional functions which use function derivatives.
For finding the roots users should not use this class directly but instantiate the derived classes, for example ROOT::Math::Roots::Newton for using the Newton algorithm. All the classes defining the alhorithms are defined in the header Math/RootFinderAlgorithm.h They possible types implementing root bracketing algorithms which use function derivatives are:
See also those classes for the documentation. See the GSL online manual for information on the GSL Root-Finding algorithms
Definition at line 74 of file GSLRootFinderDeriv.h.
Public Types | |
typedef void(* | GSLFdFPointer) (double, void *, double *, double *) |
typedef double(* | GSLFuncPointer) (double, void *) |
Public Member Functions | |
GSLRootFinderDeriv () | |
virtual | ~GSLRootFinderDeriv () |
int | Iterate () |
iterate (return GSL_SUCCESS in case of successful iteration) More... | |
int | Iterations () const |
Return number of iterations. More... | |
const char * | Name () const |
Return name of root finder algorithm. More... | |
double | Root () const |
Returns the previously calculated root. More... | |
bool | SetFunction (const IGradFunction &f, double xstart) |
Sets the function for algorithms using derivatives. More... | |
bool | SetFunction (GSLFuncPointer f, GSLFuncPointer df, GSLFdFPointer fdf, void *p, double Root) |
bool | Solve (int maxIter=100, double absTol=1E-8, double relTol=1E-10) |
Find the root (return false if failed) More... | |
int | Status () const |
Return the status of last root finding. More... | |
Public Member Functions inherited from ROOT::Math::IRootFinderMethod | |
IRootFinderMethod () | |
Default Constructor. More... | |
virtual | ~IRootFinderMethod () |
Default Destructor. More... | |
virtual bool | SetFunction (const ROOT::Math::IGenFunction &, double, double) |
Sets the function for the rest of the algorithms. More... | |
Protected Member Functions | |
void | FreeSolver () |
void | SetSolver (GSLRootFdFSolver *s) |
Private Member Functions | |
GSLRootFinderDeriv (const GSLRootFinderDeriv &) | |
GSLRootFinderDeriv & | operator= (const GSLRootFinderDeriv &) |
Private Attributes | |
GSLFunctionDerivWrapper * | fFunction |
int | fIter |
double | fPrevRoot |
double | fRoot |
GSLRootFdFSolver * | fS |
int | fStatus |
bool | fValidPoint |
#include <Math/GSLRootFinderDeriv.h>
Definition at line 103 of file GSLRootFinderDeriv.h.
typedef double( * ROOT::Math::GSLRootFinderDeriv::GSLFuncPointer) (double, void *) |
Definition at line 102 of file GSLRootFinderDeriv.h.
ROOT::Math::GSLRootFinderDeriv::GSLRootFinderDeriv | ( | ) |
Definition at line 48 of file GSLRootFinderDeriv.cxx.
|
virtual |
Definition at line 58 of file GSLRootFinderDeriv.cxx.
|
private |
Definition at line 64 of file GSLRootFinderDeriv.cxx.
|
protected |
Definition at line 102 of file GSLRootFinderDeriv.cxx.
|
virtual |
iterate (return GSL_SUCCESS in case of successful iteration)
Reimplemented from ROOT::Math::IRootFinderMethod.
Definition at line 107 of file GSLRootFinderDeriv.cxx.
|
inlinevirtual |
Return number of iterations.
Reimplemented from ROOT::Math::IRootFinderMethod.
Definition at line 117 of file GSLRootFinderDeriv.h.
|
virtual |
Return name of root finder algorithm.
Implements ROOT::Math::IRootFinderMethod.
Definition at line 132 of file GSLRootFinderDeriv.cxx.
|
private |
Definition at line 68 of file GSLRootFinderDeriv.cxx.
|
virtual |
Returns the previously calculated root.
Implements ROOT::Math::IRootFinderMethod.
Definition at line 127 of file GSLRootFinderDeriv.cxx.
|
inlinevirtual |
Sets the function for algorithms using derivatives.
Reimplemented from ROOT::Math::IRootFinderMethod.
Definition at line 96 of file GSLRootFinderDeriv.h.
bool ROOT::Math::GSLRootFinderDeriv::SetFunction | ( | GSLFuncPointer | f, |
GSLFuncPointer | df, | ||
GSLFdFPointer | fdf, | ||
void * | p, | ||
double | Root | ||
) |
Definition at line 79 of file GSLRootFinderDeriv.cxx.
|
protected |
Definition at line 97 of file GSLRootFinderDeriv.cxx.
|
virtual |
Find the root (return false if failed)
Implements ROOT::Math::IRootFinderMethod.
Definition at line 137 of file GSLRootFinderDeriv.cxx.
|
inlinevirtual |
Return the status of last root finding.
Implements ROOT::Math::IRootFinderMethod.
Definition at line 122 of file GSLRootFinderDeriv.h.
|
private |
Definition at line 134 of file GSLRootFinderDeriv.h.
|
private |
Definition at line 139 of file GSLRootFinderDeriv.h.
|
mutableprivate |
Definition at line 138 of file GSLRootFinderDeriv.h.
|
mutableprivate |
Definition at line 137 of file GSLRootFinderDeriv.h.
|
private |
Definition at line 135 of file GSLRootFinderDeriv.h.
|
private |
Definition at line 140 of file GSLRootFinderDeriv.h.
|
private |
Definition at line 141 of file GSLRootFinderDeriv.h.