39 #include "gsl/gsl_roots.h"
40 #include "gsl/gsl_errno.h"
51 fRoot(0), fPrevRoot(0),
52 fIter(0), fStatus(-1),
72 if (
this == &rhs)
return *
this;
112 MATH_ERROR_MSG(
"GSLRootFinderDeriv::Iterate",
" Function is not valid");
116 MATH_ERROR_MSG(
"GSLRootFinderDeriv::Iterate",
" Estimated point is not valid");
135 return gsl_root_fdfsolver_name(
fS->
Solver() );
149 MATH_ERROR_MSG(
"GSLRootFinderDeriv::Solve",
"error returned when performing an iteration");
163 while (status == GSL_CONTINUE && iter < maxIter);
165 if (status == GSL_CONTINUE) {
167 MATH_INFO_MSGVAL(
"GSLRootFinderDeriv::Solve",
"exceeded max iterations, reached tolerance is not sufficient",tol);
int Iterate()
iterate (return GSL_SUCCESS in case of successful iteration)
Namespace for new ROOT classes and functions.
bool IsValid()
check if function is valid (has been set)
double Root() const
Returns the previously calculated root.
gsl_root_fdfsolver * Solver() const
bool Solve(int maxIter=100, double absTol=1E-8, double relTol=1E-10)
Find the root (return false if failed)
gsl_function_fdf * GetFunc()
class to wrap a gsl_function_fdf (with derivatives)
ClassImp(TIterator) Bool_t TIterator return false
Compare two iterator objects.
void SetFdfPointer(GSLFdfPointer f)
GSLFunctionDerivWrapper * fFunction
void SetSolver(GSLRootFdFSolver *s)
Interface for finding function roots of one-dimensional functions.
std::map< std::string, std::string >::const_iterator iter
static Vc_ALWAYS_INLINE Vector< T > abs(const Vector< T > &x)
#define MATH_ERROR_MSG(loc, str)
bool SetFunction(const IGradFunction &f, double xstart)
Sets the function for algorithms using derivatives.
double(* GSLFuncPointer)(double, void *)
Function pointer corresponding to gsl_function signature.
GSLRootFinderDeriv & operator=(const GSLRootFinderDeriv &)
void SetFuncPointer(GSLFuncPointer f)
void SetDerivPointer(GSLFuncPointer f)
Root-Finder with derivatives implementation class using GSL.
int TestDelta(double x1, double x0, double epsAbs, double epsRel)
Base class for GSL Root-Finding algorithms for one dimensional functions which use function derivativ...
Namespace for new Math classes and functions.
const char * Name() const
Return name of root finder algorithm.
virtual ~GSLRootFinderDeriv()
#define MATH_INFO_MSGVAL(loc, str, x)