20#ifndef ROOT_Math_RootFinder
21#define ROOT_Math_RootFinder
93 if (
this == &rhs)
return *
this;
110 return fSolver->SetFunction(
f, xlow, xup);
124 return fSolver->SetFunction(
f, xstart);
127 template<
class Function,
class Derivative>
129 int maxIter = 100,
double absTol = 1E-8,
double relTol = 1E-10);
131 template<
class Function>
133 int maxIter = 100,
double absTol = 1E-8,
double relTol = 1E-10);
139 bool Solve(
int maxIter = 100,
double absTol = 1E-8,
double relTol = 1E-10) {
140 return fSolver->Solve( maxIter, absTol, relTol );
223template<
class Function,
class Derivative>
225 int maxIter,
double absTol,
double relTol)
229 bool ret =
fSolver->SetFunction(wf, start);
230 if (!ret)
return false;
231 return Solve(maxIter, absTol, relTol);
244template<
class Function>
246 int maxIter,
double absTol,
double relTol)
250 bool ret =
fSolver->SetFunction(wf, min, max);
251 if (!ret)
return false;
252 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 for finding function roots 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.
RootFinder(RootFinder::EType type=RootFinder::kBRENT)
Construct a Root-Finder algorithm.
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(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.
IGradientFunctionOneDim IGradFunction
IBaseFunctionOneDim IGenFunction
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...