Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:10:17

0001 // @(#)root/mathcore:$Id$
0002 // Author: David Gonzalez Maline 2/2008
0003  /**********************************************************************
0004   *                                                                    *
0005   * Copyright (c) 2006  CERN                                           *
0006   * All rights reserved.                                               *
0007   *                                                                    *
0008   * For the licensing terms see $ROOTSYS/LICENSE.                      *
0009   * For the list of contributors see $ROOTSYS/README/CREDITS.          *
0010   *                                                                    *
0011   **********************************************************************/
0012 
0013 // Header file for class Minimizer1D
0014 //
0015 // Created by: Maline  at Fri Feb  1 11:30:26 2008
0016 //
0017 
0018 #ifndef ROOT_Math_IMinimizer1D
0019 #define ROOT_Math_IMinimizer1D
0020 
0021 /**
0022 
0023    @defgroup Min1D One-dimensional Minimization
0024    Classes for one-dimensional minimization
0025    @ingroup NumAlgo
0026  */
0027 
0028 namespace ROOT {
0029 namespace Math {
0030 
0031 //___________________________________________________________________________________________
0032 /**
0033    Interface class for numerical methods for one-dimensional minimization
0034 
0035    @ingroup Min1D
0036 
0037  */
0038 
0039    class IMinimizer1D {
0040 
0041    public:
0042 
0043       IMinimizer1D() {}
0044       virtual ~IMinimizer1D() {}
0045 
0046    public:
0047 
0048       /**
0049        * Return current estimate of the position of the minimum
0050        */
0051       virtual double XMinimum() const = 0;
0052 
0053       /**
0054        * Return current lower bound of the minimization interval
0055        */
0056       virtual double XLower() const = 0;
0057 
0058       /**
0059        * Return current upper bound of the minimization interval
0060        */
0061       virtual double XUpper() const = 0;
0062 
0063       /**
0064        * Return function value at current estimate of the minimum
0065        */
0066       virtual double FValMinimum() const = 0;
0067 
0068       /**
0069        * Return function value at current lower bound of the minimization interval
0070        */
0071       virtual double FValLower() const = 0;
0072 
0073       /**
0074        * Return function value at current upper bound of the minimization interval
0075        */
0076       virtual double FValUpper() const = 0;
0077 
0078       /**
0079        * Find minimum position iterating until convergence specified by the absolute and relative tolerance or
0080        * the maximum number of iteration is reached
0081        * Return true if iterations converged successfully
0082        * \@param maxIter maximum number of iteration
0083        * \@param absTol desired absolute error in the minimum position
0084        * \@param absTol desired relative error in the minimum position
0085        */
0086       virtual bool Minimize( int maxIter, double absTol, double relTol) = 0;
0087 
0088       /**
0089        * Return number of iteration used to find minimum
0090        */
0091       virtual int Iterations() const = 0;
0092 
0093       /**
0094        * Return name of minimization algorithm
0095        */
0096       virtual const char * Name() const = 0;
0097 
0098       /** Returns the status of the previous estimate */
0099       virtual int Status() const = 0;
0100 
0101 
0102    };  // end class IMinimizer1D
0103 
0104 } // end namespace Math
0105 
0106 } // end namespace ROOT
0107 
0108 #endif /* ROOT_Math_IMinimizer1D */