31 #ifndef ROOT_Math_GSL_RootFinderDeriv
32 #define ROOT_Math_GSL_RootFinderDeriv
48 class GSLRootFdFSolver;
49 class GSLFunctionDerivWrapper;
74 class GSLRootFinderDeriv:
public IRootFinderMethod {
78 virtual ~GSLRootFinderDeriv();
82 GSLRootFinderDeriv(
const GSLRootFinderDeriv &);
83 GSLRootFinderDeriv & operator = (
const GSLRootFinderDeriv &);
89 #if defined(__MAKECINT__) || defined(G__DICTIONARY)
90 bool SetFunction(
const IGenFunction & ,
double ,
double ) {
91 std::cerr <<
"GSLRootFinderDeriv - Error : Algorithm requirs derivatives" << std::endl;
96 bool SetFunction(
const IGradFunction & f,
double xstart) {
98 return SetFunction( &GSLFunctionAdapter<IGradFunction>::F, &GSLFunctionAdapter<IGradFunction>::Df, &GSLFunctionAdapter<IGradFunction>::Fdf, const_cast<void *>(p), xstart );
102 typedef double ( * GSLFuncPointer ) ( double,
void *);
103 typedef void ( * GSLFdFPointer ) ( double,
void *,
double *,
double *);
104 bool SetFunction( GSLFuncPointer f, GSLFuncPointer df, GSLFdFPointer fdf,
void * p,
double Root );
106 using IRootFinderMethod::SetFunction;
114 bool Solve(
int maxIter = 100,
double absTol = 1E-8,
double relTol = 1E-10);
117 int Iterations()
const {
122 int Status()
const {
return fStatus; }
124 const char * Name()
const;
128 void SetSolver ( GSLRootFdFSolver * s );
134 GSLFunctionDerivWrapper * fFunction;
135 GSLRootFdFSolver * fS;
137 mutable double fRoot;
138 mutable double fPrevRoot;