// @(#)root/mathcore:$Id$
// Author: David Gonzalez Maline 2/2008
 /**********************************************************************
  *                                                                    *
  * Copyright (c) 2004 Maline,  CERN/PH-SFT                            *
  *                                                                    *
  * This library is free software; you can redistribute it and/or      *
  * modify it under the terms of the GNU General Public License        *
  * as published by the Free Software Foundation; either version 2     *
  * of the License, or (at your option) any later version.             *
  *                                                                    *
  * This library is distributed in the hope that it will be useful,    *
  * but WITHOUT ANY WARRANTY; without even the implied warranty of     *
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU   *
  * General Public License for more details.                           *
  *                                                                    *
  * You should have received a copy of the GNU General Public License  *
  * along with this library (see file COPYING); if not, write          *
  * to the Free Software Foundation, Inc., 59 Temple Place, Suite      *
  * 330, Boston, MA 02111-1307 USA, or contact the author.             *
  *                                                                    *
  **********************************************************************/

// Header file for class Minimizer1D
//
// Created by: Maline  at Fri Feb  1 11:30:26 2008
//

#ifndef ROOT_Math_IMinimizer1D
#define ROOT_Math_IMinimizer1D

/**

   @defgroup Min1D One-dimensional Minimization
   @ingroup NumAlgo
 */

namespace ROOT {
namespace Math {

//___________________________________________________________________________________________
/**
   Interface class for numerical methods for one-dimensional minimization

   @ingroup Min1D

 */

   class IMinimizer1D {

   public:

      IMinimizer1D() {}
      virtual ~IMinimizer1D() {}

   public:

      /**
       * Return current estimate of the position of the minimum
       */
      virtual double XMinimum() const = 0;

      /**
       * Return current lower bound of the minimization interval
       */
      virtual double XLower() const = 0;

      /**
       * Return current upper bound of the minimization interval
       */
      virtual double XUpper() const = 0;

      /**
       * Return function value at current estimate of the minimum
       */
      virtual double FValMinimum() const = 0;

      /**
       * Return function value at current lower bound of the minimization interval
       */
      virtual double FValLower() const = 0;

      /**
       * Return function value at current upper bound of the minimization interval
       */
      virtual double FValUpper() const = 0;

      /**
       * Find minimum position iterating until convergence specified by the absolute and relative tolerance or
       * the maximum number of iteration is reached
       * Return true if iterations converged successfully
       * \@param maxIter maximum number of iteration
       * \@param absTol desired absolute error in the minimum position
       * \@param absTol desired relative error in the minimum position
       */
      virtual bool Minimize( int maxIter, double absTol, double relTol) = 0;

      /**
       * Return number of iteration used to find minimum
       */
      virtual int Iterations() const = 0;

      /**
       * Return name of minimization algorithm
       */
      virtual const char * Name() const = 0;

      /** Returns the status of the previous estimate */
      virtual int Status() const = 0;


   };  // end class IMinimizer1D

} // end namespace Math

} // end namespace ROOT

#endif /* ROOT_Math_IMinimizer1D */
 IMinimizer1D.h:1
 IMinimizer1D.h:2
 IMinimizer1D.h:3
 IMinimizer1D.h:4
 IMinimizer1D.h:5
 IMinimizer1D.h:6
 IMinimizer1D.h:7
 IMinimizer1D.h:8
 IMinimizer1D.h:9
 IMinimizer1D.h:10
 IMinimizer1D.h:11
 IMinimizer1D.h:12
 IMinimizer1D.h:13
 IMinimizer1D.h:14
 IMinimizer1D.h:15
 IMinimizer1D.h:16
 IMinimizer1D.h:17
 IMinimizer1D.h:18
 IMinimizer1D.h:19
 IMinimizer1D.h:20
 IMinimizer1D.h:21
 IMinimizer1D.h:22
 IMinimizer1D.h:23
 IMinimizer1D.h:24
 IMinimizer1D.h:25
 IMinimizer1D.h:26
 IMinimizer1D.h:27
 IMinimizer1D.h:28
 IMinimizer1D.h:29
 IMinimizer1D.h:30
 IMinimizer1D.h:31
 IMinimizer1D.h:32
 IMinimizer1D.h:33
 IMinimizer1D.h:34
 IMinimizer1D.h:35
 IMinimizer1D.h:36
 IMinimizer1D.h:37
 IMinimizer1D.h:38
 IMinimizer1D.h:39
 IMinimizer1D.h:40
 IMinimizer1D.h:41
 IMinimizer1D.h:42
 IMinimizer1D.h:43
 IMinimizer1D.h:44
 IMinimizer1D.h:45
 IMinimizer1D.h:46
 IMinimizer1D.h:47
 IMinimizer1D.h:48
 IMinimizer1D.h:49
 IMinimizer1D.h:50
 IMinimizer1D.h:51
 IMinimizer1D.h:52
 IMinimizer1D.h:53
 IMinimizer1D.h:54
 IMinimizer1D.h:55
 IMinimizer1D.h:56
 IMinimizer1D.h:57
 IMinimizer1D.h:58
 IMinimizer1D.h:59
 IMinimizer1D.h:60
 IMinimizer1D.h:61
 IMinimizer1D.h:62
 IMinimizer1D.h:63
 IMinimizer1D.h:64
 IMinimizer1D.h:65
 IMinimizer1D.h:66
 IMinimizer1D.h:67
 IMinimizer1D.h:68
 IMinimizer1D.h:69
 IMinimizer1D.h:70
 IMinimizer1D.h:71
 IMinimizer1D.h:72
 IMinimizer1D.h:73
 IMinimizer1D.h:74
 IMinimizer1D.h:75
 IMinimizer1D.h:76
 IMinimizer1D.h:77
 IMinimizer1D.h:78
 IMinimizer1D.h:79
 IMinimizer1D.h:80
 IMinimizer1D.h:81
 IMinimizer1D.h:82
 IMinimizer1D.h:83
 IMinimizer1D.h:84
 IMinimizer1D.h:85
 IMinimizer1D.h:86
 IMinimizer1D.h:87
 IMinimizer1D.h:88
 IMinimizer1D.h:89
 IMinimizer1D.h:90
 IMinimizer1D.h:91
 IMinimizer1D.h:92
 IMinimizer1D.h:93
 IMinimizer1D.h:94
 IMinimizer1D.h:95
 IMinimizer1D.h:96
 IMinimizer1D.h:97
 IMinimizer1D.h:98
 IMinimizer1D.h:99
 IMinimizer1D.h:100
 IMinimizer1D.h:101
 IMinimizer1D.h:102
 IMinimizer1D.h:103
 IMinimizer1D.h:104
 IMinimizer1D.h:105
 IMinimizer1D.h:106
 IMinimizer1D.h:107
 IMinimizer1D.h:108
 IMinimizer1D.h:109
 IMinimizer1D.h:110
 IMinimizer1D.h:111
 IMinimizer1D.h:112
 IMinimizer1D.h:113
 IMinimizer1D.h:114
 IMinimizer1D.h:115
 IMinimizer1D.h:116
 IMinimizer1D.h:117
 IMinimizer1D.h:118