20#ifndef ROOT_Math_RootFinder
21#define ROOT_Math_RootFinder
122 template<
class Function,
class Derivative>
124 int maxIter = 100,
double absTol = 1E-8,
double relTol = 1E-10);
126 template<
class Function>
128 int maxIter = 100,
double absTol = 1E-8,
double relTol = 1E-10);
134 bool Solve(
int maxIter = 100,
double absTol = 1E-8,
double relTol = 1E-10) {
218template<
class Function,
class Derivative>
220 int maxIter,
double absTol,
double relTol)
225 if (!ret)
return false;
226 return Solve(maxIter, absTol, relTol);
239template<
class Function>
241 int maxIter,
double absTol,
double relTol)
243 if (!fSolver)
return false;
245 bool ret = fSolver->SetFunction(wf, min, max);
246 if (!ret)
return false;
247 return Solve(maxIter, absTol, relTol);
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
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...
int Iterations() const
Return the number of iteration performed to find the Root.
RootFinder(const RootFinder &)=delete
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)
Solve f(x) = 0, given a derivative d.
RootFinder & operator=(const RootFinder &rhs)=delete
double Root() const
Return the current and latest estimate of the Root.
int Iterate()
Perform a single iteration and return the Status.
RootFinder(RootFinder &&)=delete
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...