ROOT 6.08/07 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 82 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 111 of file GSLRootFinderDeriv.h.
typedef double( * ROOT::Math::GSLRootFinderDeriv::GSLFuncPointer) (double, void *) |
Definition at line 110 of file GSLRootFinderDeriv.h.
ROOT::Math::GSLRootFinderDeriv::GSLRootFinderDeriv | ( | ) |
Definition at line 49 of file GSLRootFinderDeriv.cxx.
|
virtual |
Definition at line 59 of file GSLRootFinderDeriv.cxx.
|
private |
Definition at line 65 of file GSLRootFinderDeriv.cxx.
|
protected |
Definition at line 103 of file GSLRootFinderDeriv.cxx.
|
virtual |
iterate (return GSL_SUCCESS in case of successful iteration)
Reimplemented from ROOT::Math::IRootFinderMethod.
Definition at line 108 of file GSLRootFinderDeriv.cxx.
|
inlinevirtual |
Return number of iterations.
Reimplemented from ROOT::Math::IRootFinderMethod.
Definition at line 125 of file GSLRootFinderDeriv.h.
|
virtual |
Return name of root finder algorithm.
Implements ROOT::Math::IRootFinderMethod.
Definition at line 133 of file GSLRootFinderDeriv.cxx.
|
private |
Definition at line 69 of file GSLRootFinderDeriv.cxx.
|
virtual |
Returns the previously calculated root.
Implements ROOT::Math::IRootFinderMethod.
Definition at line 128 of file GSLRootFinderDeriv.cxx.
|
inlinevirtual |
Sets the function for algorithms using derivatives.
Reimplemented from ROOT::Math::IRootFinderMethod.
Definition at line 104 of file GSLRootFinderDeriv.h.
bool ROOT::Math::GSLRootFinderDeriv::SetFunction | ( | GSLFuncPointer | f, |
GSLFuncPointer | df, | ||
GSLFdFPointer | fdf, | ||
void * | p, | ||
double | Root | ||
) |
Definition at line 80 of file GSLRootFinderDeriv.cxx.
|
protected |
Definition at line 98 of file GSLRootFinderDeriv.cxx.
|
virtual |
Find the root (return false if failed)
Implements ROOT::Math::IRootFinderMethod.
Definition at line 138 of file GSLRootFinderDeriv.cxx.
|
inlinevirtual |
Return the status of last root finding.
Implements ROOT::Math::IRootFinderMethod.
Definition at line 130 of file GSLRootFinderDeriv.h.
|
private |
Definition at line 142 of file GSLRootFinderDeriv.h.
|
private |
Definition at line 147 of file GSLRootFinderDeriv.h.
|
mutableprivate |
Definition at line 146 of file GSLRootFinderDeriv.h.
|
mutableprivate |
Definition at line 145 of file GSLRootFinderDeriv.h.
|
private |
Definition at line 143 of file GSLRootFinderDeriv.h.
|
private |
Definition at line 148 of file GSLRootFinderDeriv.h.
|
private |
Definition at line 149 of file GSLRootFinderDeriv.h.