FunctionMinimizer.h

Go to the documentation of this file.
00001 // @(#)root/minuit2:$Id: FunctionMinimizer.h 21530 2007-12-20 11:14:35Z moneta $
00002 // Authors: M. Winkler, F. James, L. Moneta, A. Zsenei   2003-2005  
00003 
00004 /**********************************************************************
00005  *                                                                    *
00006  * Copyright (c) 2005 LCG ROOT Math team,  CERN/PH-SFT                *
00007  *                                                                    *
00008  **********************************************************************/
00009 
00010 #ifndef ROOT_Minuit2_FunctionMinimizer
00011 #define ROOT_Minuit2_FunctionMinimizer
00012 
00013 
00014 #include "Minuit2/MnConfig.h"
00015 #include <vector>
00016 
00017 namespace ROOT {
00018 
00019    namespace Minuit2 {
00020 
00021 
00022 class FCNBase;
00023 class FCNGradientBase;
00024 class FunctionMinimum;
00025 
00026 //_____________________________________________________________________________________
00027 /** base class for function minimizers; user may give FCN or FCN with Gradient,
00028     Parameter starting values and initial Error guess (sigma) (or "step size"),
00029     or Parameter starting values and initial covariance matrix; 
00030     covariance matrix is stored in Upper triangular packed storage format, 
00031     e.g. the Elements in the array are arranged like 
00032     {a(0,0), a(0,1), a(1,1), a(0,2), a(1,2), a(2,2), ...},
00033     the size is nrow*(nrow+1)/2 (see also MnUserCovariance.h);   
00034  */
00035 
00036 class FunctionMinimizer {
00037 
00038 public:
00039   
00040    virtual ~FunctionMinimizer() {}
00041 
00042    //starting values for parameters and errors
00043    virtual FunctionMinimum Minimize(const FCNBase&, const std::vector<double>& par, const std::vector<double>& err, unsigned int strategy, unsigned int maxfcn, double toler) const = 0; 
00044 
00045    //starting values for parameters and errors and FCN with Gradient
00046    virtual FunctionMinimum Minimize(const FCNGradientBase&, const std::vector<double>& par, const std::vector<double>& err, unsigned int strategy, unsigned int maxfcn, double toler) const = 0; 
00047 
00048    //starting values for parameters and covariance matrix
00049    virtual FunctionMinimum Minimize(const FCNBase&, const std::vector<double>& par, unsigned int nrow, const std::vector<double>& cov, unsigned int strategy, unsigned int maxfcn, double toler) const = 0; 
00050 
00051    //starting values for parameters and covariance matrix and FCN with Gradient
00052    virtual FunctionMinimum Minimize(const FCNGradientBase&, const std::vector<double>& par, unsigned int nrow, const std::vector<double>& cov, unsigned int strategy, unsigned int maxfcn, double toler) const = 0; 
00053 
00054 };
00055 
00056   }  // namespace Minuit2
00057 
00058 }  // namespace ROOT
00059 
00060 #endif  // ROOT_Minuit2_FunctionMinimizer

Generated on Tue Jul 5 14:25:42 2011 for ROOT_528-00b_version by  doxygen 1.5.1