Logo ROOT  
Reference Guide
RooBrentRootFinder Class Reference

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 21 of file RooBrentRootFinder.h.

Public Member Functions

 RooBrentRootFinder (const RooAbsFunc &function)
 Constructor taking function binding as input. More...
 
 ~RooBrentRootFinder () override
 
Bool_t findRoot (Double_t &result, Double_t xlo, Double_t xhi, Double_t value=0) const override
 Do the root finding using the Brent-Decker method. More...
 
TClassIsA () const override
 
void setTol (Double_t tol)
 Set convergence tolerance parameter. More...
 
void Streamer (TBuffer &) override
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 
- Public Member Functions inherited from RooAbsRootFinder
 RooAbsRootFinder (const RooAbsFunc &function)
 Constructor take function binding as argument. More...
 
virtual ~RooAbsRootFinder ()
 
virtual Bool_t findRoot (Double_t &result, Double_t xlo, Double_t xhi, Double_t value=0) const =0
 
virtual TClassIsA () const
 
virtual void Streamer (TBuffer &)
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 

Static Public Member Functions

static TClassClass ()
 
static const char * Class_Name ()
 
static Version_t Class_Version ()
 
static const char * DeclFileName ()
 
- Static Public Member Functions inherited from RooAbsRootFinder
static TClassClass ()
 
static const char * Class_Name ()
 
static Version_t Class_Version ()
 
static const char * DeclFileName ()
 

Protected Types

enum  { MaxIterations = 512 }
 

Protected Attributes

Double_t _tol
 
- Protected Attributes inherited from RooAbsRootFinder
const RooAbsFunc_function
 Pointer to input function. More...
 
Bool_t _valid
 True if current state is valid. More...
 

#include <RooBrentRootFinder.h>

Inheritance diagram for RooBrentRootFinder:
[legend]

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
protected
Enumerator
MaxIterations 

Definition at line 34 of file RooBrentRootFinder.h.

Constructor & Destructor Documentation

◆ RooBrentRootFinder()

RooBrentRootFinder::RooBrentRootFinder ( const RooAbsFunc function)

Constructor taking function binding as input.

Definition at line 42 of file RooBrentRootFinder.cxx.

◆ ~RooBrentRootFinder()

RooBrentRootFinder::~RooBrentRootFinder ( )
inlineoverride

Definition at line 24 of file RooBrentRootFinder.h.

Member Function Documentation

◆ Class()

static TClass * RooBrentRootFinder::Class ( )
static
Returns
TClass describing this class

◆ Class_Name()

static const char * RooBrentRootFinder::Class_Name ( )
static
Returns
Name of this class

◆ Class_Version()

static Version_t RooBrentRootFinder::Class_Version ( )
inlinestatic
Returns
Version of this class

Definition at line 38 of file RooBrentRootFinder.h.

◆ DeclFileName()

static const char * RooBrentRootFinder::DeclFileName ( )
inlinestatic
Returns
Name of the file containing the class declaration

Definition at line 38 of file RooBrentRootFinder.h.

◆ findRoot()

Bool_t RooBrentRootFinder::findRoot ( Double_t result,
Double_t  xlo,
Double_t  xhi,
Double_t  value = 0 
) const
overridevirtual

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.

Implements RooAbsRootFinder.

Definition at line 56 of file RooBrentRootFinder.cxx.

◆ IsA()

TClass * RooBrentRootFinder::IsA ( ) const
inlineoverridevirtual
Returns
TClass describing current object

Reimplemented from RooAbsRootFinder.

Definition at line 38 of file RooBrentRootFinder.h.

◆ setTol()

void RooBrentRootFinder::setTol ( Double_t  tol)
inline

Set convergence tolerance parameter.

Definition at line 29 of file RooBrentRootFinder.h.

◆ Streamer()

void RooBrentRootFinder::Streamer ( TBuffer )
overridevirtual

Reimplemented from RooAbsRootFinder.

◆ StreamerNVirtual()

void RooBrentRootFinder::StreamerNVirtual ( TBuffer ClassDef_StreamerNVirtual_b)
inline

Definition at line 38 of file RooBrentRootFinder.h.

Member Data Documentation

◆ _tol

Double_t RooBrentRootFinder::_tol
protected

Definition at line 36 of file RooBrentRootFinder.h.

Libraries for RooBrentRootFinder:
[legend]

The documentation for this class was generated from the following files: