31#ifndef ROOT_Math_RootFinder
32#define ROOT_Math_RootFinder
104 if (
this == &rhs)
return *
this;
138 template<
class Function,
class Derivative>
140 int maxIter = 100,
double absTol = 1E-8,
double relTol = 1E-10);
142 template<
class Function>
144 int maxIter = 100,
double absTol = 1E-8,
double relTol = 1E-10);
150 bool Solve(
int maxIter = 100,
double absTol = 1E-8,
double relTol = 1E-10) {
224template<
class Function,
class Derivative>
226 int maxIter,
double absTol,
double relTol)
231 if (!ret)
return false;
232 return Solve(maxIter, absTol, relTol);
235template<
class Function>
237 int maxIter,
double absTol,
double relTol)
239 if (!fSolver)
return false;
241 bool ret = fSolver->SetFunction(wf, min, max);
242 if (!ret)
return false;
243 return Solve(maxIter, absTol, relTol);
Double_t(* Function)(Double_t)
GradFunctor1D class for one-dimensional gradient functions.
Interface (abstract class) for generic functions objects of one-dimension Provides a method to evalua...
Interface (abstract class) for one-dimensional functions providing a gradient calculation.
Interface for finding function roots of one-dimensional functions.
virtual int Iterations() const
Return number of iterations used to find the root Must be implemented by derived classes.
virtual bool SetFunction(const ROOT::Math::IGradFunction &, double)
Sets the function for algorithms using derivatives.
virtual int Status() const =0
Returns the status of the previous estimate.
virtual double Root() const =0
Returns the previously calculated root.
virtual int Iterate()
This method is implemented only by the GSLRootFinder and GSLRootFinderDeriv classes and will return a...
virtual bool Solve(int maxIter=100, double absTol=1E-8, double relTol=1E-10)=0
Stimates the root for the function.
virtual const char * Name() const =0
Return name of root finder algorithm.
User Class to find the Root of one dimensional functions.
bool SetMethod(RootFinder::EType type=RootFinder::kBRENT)
bool Solve(int maxIter=100, double absTol=1E-8, double relTol=1E-10)
Compute the roots iterating until the estimate of the Root is within the required tolerance returning...
RootFinder & operator=(const RootFinder &rhs)
int Iterations() const
Return the number of iteration performed to find the Root.
const char * Name() const
Return the current and latest estimate of the lower value of the Root-finding interval (for bracketin...
bool SetFunction(const IGenFunction &f, double xlow, double xup)
Provide to the solver the function and the initial search interval [xlow, xup] for algorithms not usi...
IRootFinderMethod * fSolver
bool SetFunction(const IGradFunction &f, double xstart)
Provide to the solver the function and an initial estimate of the root, for algorithms using derivati...
bool Solve(Function &f, Derivative &d, double start, int maxIter=100, double absTol=1E-8, double relTol=1E-10)
RootFinder(const RootFinder &)
double Root() const
Return the current and latest estimate of the Root.
int Iterate()
Perform a single iteration and return the Status.
int Status() const
Return the status of the last estimate of the Root = 0 OK, not zero failure.
Template class to wrap any C++ callable object which takes one argument i.e.
Namespace for new Math classes and functions.
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...