46 _tol(2.2204460492503131e-16)
64 Double_t fb= (*_function)(&b) - value;
67 <<
a <<
"," << b <<
"), value = " << value <<
" f[xlo] = " << fa <<
" f[xhi] = " << fb << endl;
76 if ((fb < 0 && fc < 0) || (fb > 0 && fc > 0)) {
99 if (fb == 0 ||
fabs(m) <=
tol) {
106 if (fabs (e) < tol || fabs (fa) <= fabs (fb)) {
123 p = s * (2 * m * q * (q -
r) - (b -
a) * (r - 1));
124 q = (q - 1) * (r - 1) * (s - 1);
136 if (2 * p < (min1 < min2 ? min1 : min2)) {
151 if (fabs (d) > tol) {
155 b += (m > 0 ? +tol : -
tol);
157 fb= (*_function)(&b) - value;
virtual const char * getName() const
virtual void saveXVec() const
RooBrentRootFinder(const RooAbsFunc &function)
Constructor taking function binding as input.
static struct mg_connection * fc(struct mg_context *ctx)
std::map< std::string, std::string >::const_iterator iter
VecExpr< UnaryOp< Fabs< T >, VecExpr< A, T, D >, T >, T, D > fabs(const VecExpr< A, T, D > &rhs)
void function(const char *name_, T fun, const char *docstring=0)
virtual void restoreXVec() const
const RooAbsFunc * _function
ClassImp(RooBrentRootFinder)
Mother of all ROOT objects.
virtual Bool_t findRoot(Double_t &result, Double_t xlo, Double_t xhi, Double_t value=0) const
Do the root finding using the Brent-Decker method.