Implement the abstract 1-dimensional root finding interface using the Brent-Decker method.
This implementation is based on the one in the GNU scientific library (v0.99).
Definition at line 23 of file RooBrentRootFinder.h.
Public Member Functions | |
RooBrentRootFinder (const RooAbsFunc &function) | |
Constructor taking function binding as input. | |
virtual | ~RooBrentRootFinder ()=default |
bool | findRoot (double &result, double xlo, double xhi, double value=0) const |
Do the root finding using the Brent-Decker method. | |
virtual TClass * | IsA () const |
void | setTol (double tol) |
Set convergence tolerance parameter. | |
virtual void | Streamer (TBuffer &) |
void | StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b) |
Static Public Member Functions | |
static TClass * | Class () |
static const char * | Class_Name () |
static constexpr Version_t | Class_Version () |
static const char * | DeclFileName () |
Protected Attributes | |
const RooAbsFunc * | _function |
Pointer to input function. | |
double | _tol |
bool | _valid |
True if current state is valid. | |
Static Protected Attributes | |
static constexpr int | MaxIterations = 512 |
#include <RooBrentRootFinder.h>
RooBrentRootFinder::RooBrentRootFinder | ( | const RooAbsFunc & | function | ) |
Constructor taking function binding as input.
Definition at line 41 of file RooBrentRootFinder.cxx.
|
virtualdefault |
|
static |
|
inlinestaticconstexpr |
Definition at line 43 of file RooBrentRootFinder.h.
|
inlinestatic |
Definition at line 43 of file RooBrentRootFinder.h.
bool RooBrentRootFinder::findRoot | ( | double & | result, |
double | xlo, | ||
double | xhi, | ||
double | value = 0 |
||
) | const |
Do the root finding using the Brent-Decker method.
Returns a boolean status and loads 'result' with our best guess at the root if true. Prints a warning if the initial interval does not bracket a single root or if the root is not found after a fixed number of iterations.
Definition at line 60 of file RooBrentRootFinder.cxx.
|
inlinevirtual |
Definition at line 43 of file RooBrentRootFinder.h.
|
inline |
Set convergence tolerance parameter.
Definition at line 31 of file RooBrentRootFinder.h.
|
virtual |
|
inline |
Definition at line 43 of file RooBrentRootFinder.h.
|
protected |
Pointer to input function.
Definition at line 38 of file RooBrentRootFinder.h.
|
protected |
Definition at line 41 of file RooBrentRootFinder.h.
|
protected |
True if current state is valid.
Definition at line 39 of file RooBrentRootFinder.h.
|
staticconstexprprotected |
Definition at line 36 of file RooBrentRootFinder.h.