Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-30 10:22:11

0001 // @(#)root/minuit2:$Id$
0002 // Authors: M. Winkler, F. James, L. Moneta, A. Zsenei   2003-2005
0003 
0004 /**********************************************************************
0005  *                                                                    *
0006  * Copyright (c) 2005 LCG ROOT Math team,  CERN/PH-SFT                *
0007  *                                                                    *
0008  **********************************************************************/
0009 
0010 #ifndef ROOT_Minuit2_FunctionMinimizer
0011 #define ROOT_Minuit2_FunctionMinimizer
0012 
0013 #include "Minuit2/MnConfig.h"
0014 #include <vector>
0015 
0016 namespace ROOT {
0017 
0018 namespace Minuit2 {
0019 
0020 class FCNBase;
0021 class FCNGradientBase;
0022 class FunctionMinimum;
0023 
0024 //_____________________________________________________________________________________
0025 /** base class for function minimizers; user may give FCN or FCN with Gradient,
0026     Parameter starting values and initial Error guess (sigma) (or "step size"),
0027     or Parameter starting values and initial covariance matrix;
0028     covariance matrix is stored in Upper triangular packed storage format,
0029     e.g. the Elements in the array are arranged like
0030     {a(0,0), a(0,1), a(1,1), a(0,2), a(1,2), a(2,2), ...},
0031     the size is nrow*(nrow+1)/2 (see also MnUserCovariance.h);
0032  */
0033 
0034 class FunctionMinimizer {
0035 
0036 public:
0037    virtual ~FunctionMinimizer() {}
0038 
0039    // starting values for parameters and errors
0040    virtual FunctionMinimum Minimize(const FCNBase &, const std::vector<double> &par, const std::vector<double> &err,
0041                                     unsigned int strategy, unsigned int maxfcn, double toler) const = 0;
0042 
0043    // starting values for parameters and errors and FCN with Gradient
0044    virtual FunctionMinimum Minimize(const FCNGradientBase &, const std::vector<double> &par,
0045                                     const std::vector<double> &err, unsigned int strategy, unsigned int maxfcn,
0046                                     double toler) const = 0;
0047 
0048    // starting values for parameters and covariance matrix
0049    virtual FunctionMinimum Minimize(const FCNBase &, const std::vector<double> &par, unsigned int nrow,
0050                                     const std::vector<double> &cov, unsigned int strategy, unsigned int maxfcn,
0051                                     double toler) const = 0;
0052 
0053    // starting values for parameters and covariance matrix and FCN with Gradient
0054    virtual FunctionMinimum Minimize(const FCNGradientBase &, const std::vector<double> &par, unsigned int nrow,
0055                                     const std::vector<double> &cov, unsigned int strategy, unsigned int maxfcn,
0056                                     double toler) const = 0;
0057 };
0058 
0059 } // namespace Minuit2
0060 
0061 } // namespace ROOT
0062 
0063 #endif // ROOT_Minuit2_FunctionMinimizer