44  _tol(2.2204460492503131e-16)
 
   61  double fa= (*_function)(&
a) - 
value;
 
   62  double fb= (*_function)(&
b) - 
value;
 
   65            << 
a << 
"," << 
b << 
"), value = " << 
value << 
" f[xlo] = " << fa << 
" f[xhi] = " << fb << endl;
 
   71  double c(0),
d(0),
e(0);
 
   74    if ((fb < 0 && fc < 0) || (fb > 0 && fc > 0)) {
 
   83    if (std::abs(fc) < std::abs(fb)) {
 
   93    double tol = 0.5 * 
_tol * std::abs(
b);
 
   94    double m = 0.5 * (
c - 
b);
 
   97    if (fb == 0 || std::abs(
m) <= tol) {
 
  104    if (std::abs(
e) < tol || std::abs(fa) <= std::abs(fb)) {
 
  121   p = s * (2 * 
m * 
q * (
q - 
r) - (
b - 
a) * (
r - 1));
 
  122   q = (
q - 1) * (
r - 1) * (s - 1);
 
  132      double min1= 3 * 
m * 
q - std::abs(tol * 
q);
 
  133      double min2= std::abs(
e * 
q);
 
  134      if (2 * 
p < (min1 < min2 ? min1 : min2)) {
 
  149    if (std::abs(
d) > tol) {
 
  153      b += (
m > 0 ? +tol : -tol);
 
  155    fb= (*_function)(&
b) - 
value;
 
  159  oocoutE(
nullptr,Eval) << 
"RooBrentRootFinder::findRoot(" << 
_function->
getName() << 
"): maximum iterations exceeded." << endl;
 
winID h TVirtualViewer3D TVirtualGLPainter p
 
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 r
 
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 result
 
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void value
 
Abstract interface for evaluating a real-valued function of one real variable and performing numerica...
 
virtual void saveXVec() const
 
virtual void restoreXVec() const
 
virtual const char * getName() const
Name of function binding.
 
RooAbsRootFinder is the abstract interface for finding roots of real-valued 1-dimensional function th...
 
const RooAbsFunc * _function
Pointer to input function.
 
Implement the abstract 1-dimensional root finding interface using the Brent-Decker method.
 
RooBrentRootFinder(const RooAbsFunc &function)
Constructor taking function binding as input.
 
bool findRoot(double &result, double xlo, double xhi, double value=0) const override
Do the root finding using the Brent-Decker method.
 
Mother of all ROOT objects.