Back to home page

EIC code displayed by LXR

 
 

    


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

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_ModularFunctionMinimizer
0011 #define ROOT_Minuit2_ModularFunctionMinimizer
0012 
0013 #include "Minuit2/MnConfig.h"
0014 
0015 #include "Minuit2/FunctionMinimizer.h"
0016 
0017 #include <vector>
0018 
0019 namespace ROOT {
0020 
0021 namespace Minuit2 {
0022 
0023 class MinimumSeedGenerator;
0024 class MinimumBuilder;
0025 class MinimumSeed;
0026 class MnFcn;
0027 class GradientCalculator;
0028 class MnUserParameterState;
0029 class MnUserParameters;
0030 class MnUserCovariance;
0031 class MnStrategy;
0032 class FumiliFCNBase;
0033 
0034 //_____________________________________________________________
0035 /**
0036    Base common class providing the API for all the minimizer
0037    Various Minimize methods are provided varying on the type of
0038    FCN function passesd and on the objects used for the parameters
0039  */
0040 class ModularFunctionMinimizer : public FunctionMinimizer {
0041 
0042 public:
0043    ~ModularFunctionMinimizer() override {}
0044 
0045    // inherited interface
0046    FunctionMinimum Minimize(const FCNBase &, const std::vector<double> &, const std::vector<double> &,
0047                                     unsigned int stra = 1, unsigned int maxfcn = 0, double toler = 0.1) const override;
0048 
0049    FunctionMinimum Minimize(const FCNGradientBase &, const std::vector<double> &, const std::vector<double> &,
0050                                     unsigned int stra = 1, unsigned int maxfcn = 0, double toler = 0.1) const override;
0051 
0052    FunctionMinimum Minimize(const FCNBase &, const std::vector<double> &, unsigned int,
0053                                     const std::vector<double> &, unsigned int stra = 1, unsigned int maxfcn = 0,
0054                                     double toler = 0.1) const override;
0055 
0056    FunctionMinimum Minimize(const FCNGradientBase &, const std::vector<double> &, unsigned int,
0057                                     const std::vector<double> &, unsigned int stra = 1, unsigned int maxfcn = 0,
0058                                     double toler = 0.1) const override;
0059 
0060    // extension
0061    virtual FunctionMinimum Minimize(const FCNBase &, const MnUserParameters &, const MnStrategy &,
0062                                     unsigned int maxfcn = 0, double toler = 0.1) const;
0063 
0064    virtual FunctionMinimum Minimize(const FCNGradientBase &, const MnUserParameters &, const MnStrategy &,
0065                                     unsigned int maxfcn = 0, double toler = 0.1) const;
0066 
0067    virtual FunctionMinimum Minimize(const FCNBase &, const MnUserParameters &, const MnUserCovariance &,
0068                                     const MnStrategy &, unsigned int maxfcn = 0, double toler = 0.1) const;
0069 
0070    virtual FunctionMinimum Minimize(const FCNGradientBase &, const MnUserParameters &, const MnUserCovariance &,
0071                                     const MnStrategy &, unsigned int maxfcn = 0, double toler = 0.1) const;
0072 
0073    virtual FunctionMinimum Minimize(const FCNBase &, const MnUserParameterState &, const MnStrategy &,
0074                                     unsigned int maxfcn = 0, double toler = 0.1) const;
0075 
0076    virtual FunctionMinimum Minimize(const FCNGradientBase &, const MnUserParameterState &, const MnStrategy &,
0077                                     unsigned int maxfcn = 0, double toler = 0.1) const;
0078 
0079    // for Fumili
0080 
0081    //   virtual FunctionMinimum Minimize(const FumiliFCNBase&, const std::vector<double>&, const std::vector<double>&,
0082    //   unsigned int stra=1, unsigned int maxfcn = 0, double toler = 0.1) const;
0083 
0084    //   virtual FunctionMinimum Minimize(const FumiliFCNBase&, const MnUserParameters&, const MnStrategy&, unsigned int
0085    //   maxfcn = 0, double toler = 0.1) const;
0086 
0087    //   virtual FunctionMinimum Minimize(const FumiliFCNBase&, const MnUserParameters&, const MnUserCovariance&, const
0088    //   MnStrategy&, unsigned int maxfcn = 0, double toler = 0.1) const;
0089 
0090    //   virtual FunctionMinimum Minimize(const FumiliFCNBase&, const MnUserParameterState&, const MnStrategy&, unsigned
0091    //   int maxfcn = 0, double toler = 0.1) const;
0092 
0093    virtual const MinimumSeedGenerator &SeedGenerator() const = 0;
0094    virtual const MinimumBuilder &Builder() const = 0;
0095    virtual MinimumBuilder &Builder() = 0;
0096 
0097 public:
0098    virtual FunctionMinimum Minimize(const MnFcn &, const GradientCalculator &, const MinimumSeed &, const MnStrategy &,
0099                                     unsigned int, double) const;
0100 };
0101 
0102 } // namespace Minuit2
0103 
0104 } // namespace ROOT
0105 
0106 #endif // ROOT_Minuit2_ModularFunctionMinimizer