ROOT logo
ROOT » MATH » MATHCORE » ROOT::Math::BrentMinimizer1D

class ROOT::Math::BrentMinimizer1D: private ROOT::Math::IMinimizer1D


   User class for performing function minimization

   It will use the Brent Method for function minimization in a given interval.
   This class is implemented from TF1::GetMinimum.

   To use the class, three steps have to be taken:
       1. Create the class.
       2. Set a function within an interval to look for the minimum.
       3. Call the Minimize function with the error parameters.

   If another minimization is to be performed, repeat the last two steps.

   @ingroup Min1D


Function Members (Methods)

public:
virtual~BrentMinimizer1D()
ROOT::Math::BrentMinimizer1DBrentMinimizer1D()
ROOT::Math::BrentMinimizer1DBrentMinimizer1D(const ROOT::Math::BrentMinimizer1D&)
virtual doubleFValLower() const
virtual doubleFValMinimum() const
virtual doubleFValUpper() const
virtual intIterations() const
virtual intMinimize(int maxIter, double absTol, double relTol)
virtual const char*Name() const
intSetFunction(const ROOT::Math::IGenFunction& f, double xlow, double xup)
virtual doubleXLower() const
virtual doubleXMinimum() const
virtual doubleXUpper() const

Data Members

protected:
const ROOT::Math::IGenFunction*fFunctionPointer to the function.
intfNIterNumber of iterations needed for the last stimation.
doublefXMaxUpper bound of the search interval
doublefXMinLower bound of the search interval.
doublefXMinimumPosition of the stimated minimum.

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

BrentMinimizer1D()
 Default Constructor. 
virtual ~BrentMinimizer1D()
 Default Destructor. 
double XMinimum() const
 Return current estimate of the position of the minimum. 
double XLower() const
 Return current lower bound of the minimization interval. 
double XUpper() const
 Return current upper bound of the minimization interval. 
double FValMinimum() const
 Return function value at current estimate of the minimum. 
double FValLower() const
 Return function value at current lower bound of the minimization interval. 
double FValUpper() const
 Return function value at current upper bound of the minimization interval. 
int Minimize(int maxIter, double absTol, double relTol)
 Find minimum position iterating until convergence specified by the absolute and relative tolerance or
          the maximum number of iteration is reached.

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

int Iterations() const
 Return number of iteration used to find minimum 
const char * Name() const
 Return name of minimization algorithm ("BrentMinimizer1D") 
int SetFunction(const ROOT::Math::IGenFunction& f, double xlow, double xup)
 Sets function to be minimized.

          \@param f Function to be minimized.
          \@param xlow Lower bound of the search interval.
          \@param xup Upper bound of the search interval.