class ROOT::Math::BrentRootFinder: public ROOT::Math::IRootFinderMethod


   User class for finding function roots.

   It will use the Brent Method for finding function roots in a given interval.
   This class is implemented from TF1::GetX() method.

   @ingroup RootFinders


Function Members (Methods)

public:
virtual~BrentRootFinder()
ROOT::Math::BrentRootFinderBrentRootFinder()
ROOT::Math::BrentRootFinderBrentRootFinder(const ROOT::Math::BrentRootFinder&)
virtual intROOT::Math::IRootFinderMethod::Iterate()
virtual intROOT::Math::IRootFinderMethod::Iterations() const
virtual const char*Name() const
ROOT::Math::IRootFinderMethod&ROOT::Math::IRootFinderMethod::operator=(const ROOT::Math::IRootFinderMethod&)
virtual doubleRoot() const
virtual intSetFunction(const ROOT::Math::IGenFunction& f, double xlow, double xup)
virtual intSolve(int maxIter = 100, double absTol = 1E-3, double relTol = 1E-6)

Data Members

protected:
const ROOT::Math::IGenFunction*fFunctionPointer to the function.
doublefRootCurrent stimation of the function root.
doublefXMaxUpper bound of the search interval
doublefXMinLower bound of the search interval.

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

virtual ~BrentRootFinder()
 Default Destructor. 
BrentRootFinder(const ROOT::Math::BrentRootFinder& )
 Default Constructor. 
int SetFunction(const ROOT::Math::IGenFunction& f, double xlow, double xup)
int Solve(int maxIter = 100, double absTol = 1E-3, double relTol = 1E-6)
 Returns the X value corresponding to the function value fy for (xmin<x<xmax).
          Method:
          First, the grid search is used to bracket the maximum
          with the step size = (xmax-xmin)/fNpx. This way, the step size
          can be controlled via the SetNpx() function. If the function is
          unimodal or if its extrema are far apart, setting the fNpx to
          a small value speeds the algorithm up many times.
          Then, Brent's method is applied on the bracketed interval.

          \@param maxIter maximum number of iterations.
          \@param absTol desired absolute error in the minimum position.
          \@param absTol desired relative error in the minimum position.

double Root()
 Returns root value. Need to call first Solve(). 
const char* Name()
 Return name of root finder algorithm ("BrentRootFinder"). 

Last change: root/mathcore:$Id: BrentRootFinder.h 24477 2008-06-23 12:58:47Z moneta $
Last generated: 2008-06-25 08:29
Copyright (c) 2006 , LCG ROOT MathLib Team *

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.