class ROOT::Math::Minimizer1D



Minimizer for arbitrary one dimensional functions.

Implemented using GSL, for detailed description see:
<A HREF="http://www.gnu.org/software/gsl/manual/html_node/One-dimensional-Minimization.html">GSL online doc</A>

The algorithms uspported are only bracketing algorithm which do not use derivatives information.
The algorithms which can be choosen at construction time are  GOLDENSECTION, whic is the simplest method
but the slowest and BRENT (the default one) which combines the golden section with a parabolic interpolation.


This class does not support copying
@ingroup Min1D

Function Members (Methods)

public:
virtual~Minimizer1D()
doubleFValLower() const
doubleFValMinimum() const
doubleFValUpper() const
intIterate()
intIterations() const
intMinimize(int maxIter, double absTol, double relTol)
ROOT::Math::Minimizer1DMinimizer1D(ROOT::Math::Minim1D::Type type = Minim1D::BRENT)
const char*Name() const
voidSetFunction(ROOT::Math::GSLFuncPointer f, void* params, double xmin, double xlow, double xup)
static intTestInterval(double xlow, double xup, double epsAbs, double epsRel)
doubleXLower() const
doubleXMinimum() const
doubleXUpper() const
private:
ROOT::Math::Minimizer1DMinimizer1D(const ROOT::Math::Minimizer1D&)
ROOT::Math::Minimizer1D&operator=(const ROOT::Math::Minimizer1D&)

Data Members

private:
ROOT::Math::GSLFunctionWrapper*fFunction
boolfIsSet
intfIter
doublefLow
doublefMin
ROOT::Math::GSL1DMinimizer*fMinimizer
doublefUp
doublefXlow
doublefXmin
doublefXup

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

explicit Minimizer1D(Minim1D::Type type=Minim1D::BRENT)
Construct the minimizer passing the minimizer type using the Minim1D::Algorithm enumeration

virtual ~Minimizer1D()
Destructor: free allocated resources

Minimizer1D(const Minimizer1D &)
 usually copying is non trivial, so we make this unaccessible
void SetFunction( const UserFunc & f, double xmin, double xlow, double xup)
Set, or reset, minimizer to use the function f and the initial search interval [xlow, xup], with a guess for the location of the minimum xmin.
The condition : \f$ f(xlow) > f(xmin) < f(xup)\f$  must be satisfied

int Iterate()
Perform a minimizer iteration and
if an unexepcted problem occurr then an error code will be returned

double XMinimum()
Return current estimate of the position of the minimum

double XLower()
Return current lower bound of the minimization interval

double XUpper()
Return current upper bound of the minimization interval

double FValMinimum()
Return function value at current estimate of the minimum

double FValLower()
Return function value at current lower bound of the minimization interval

double FValUpper()
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 iteration
\@param absTol desired absolute error in the minimum position
\@param absTol desired relative error in the minimum position

int Iterations()
Return number of iteration used to find minimum

const char * Name()
Return name of minimization algorithm

int TestInterval(double xlow, double xup, double epsAbs, double epsRel)
Test convergence of the interval.
The test returns success if
\f[
|x_{min}-x_{truemin}| < epsAbs + epsRel *x_{truemin}
\f]


Author: L. Moneta, A. Zsenei 08/2005
Last update: root/mathmore:$Id: Minimizer1D.h 21553 2007-12-21 10:55:46Z moneta $
Copyright (c) 2004 moneta, CERN/PH-SFT *

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.