Back to home page

EIC code displayed by LXR

 
 

    


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

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_VariableMetricMinimizer
0011 #define ROOT_Minuit2_VariableMetricMinimizer
0012 
0013 #include "Minuit2/MnConfig.h"
0014 #include "Minuit2/ModularFunctionMinimizer.h"
0015 #include "Minuit2/MnSeedGenerator.h"
0016 #include "Minuit2/VariableMetricBuilder.h"
0017 
0018 namespace ROOT {
0019 
0020 namespace Minuit2 {
0021 
0022 class BFGSMinimizerType {
0023 };
0024 
0025 //______________________________________________________________________________
0026 /**
0027     Instantiates the SeedGenerator and MinimumBuilder for
0028     Variable Metric Minimization method.
0029     API is provided in the upper ROOT::Minuit2::ModularFunctionMinimizer class
0030 
0031  */
0032 
0033 class VariableMetricMinimizer : public ModularFunctionMinimizer {
0034 
0035 public:
0036    class BFGSType {
0037    };
0038 
0039    VariableMetricMinimizer() : fMinSeedGen(MnSeedGenerator()), fMinBuilder(VariableMetricBuilder()) {}
0040 
0041    VariableMetricMinimizer(BFGSType)
0042       : fMinSeedGen(MnSeedGenerator()), fMinBuilder(VariableMetricBuilder(VariableMetricBuilder::kBFGS))
0043    {
0044    }
0045 
0046    ~VariableMetricMinimizer() override {}
0047 
0048    const MinimumSeedGenerator &SeedGenerator() const override { return fMinSeedGen; }
0049    const MinimumBuilder &Builder() const override { return fMinBuilder; }
0050    MinimumBuilder &Builder() override { return fMinBuilder; }
0051 
0052 private:
0053    MnSeedGenerator fMinSeedGen;
0054    VariableMetricBuilder fMinBuilder;
0055 };
0056 
0057 } // namespace Minuit2
0058 
0059 } // namespace ROOT
0060 
0061 #endif // ROOT_Minuit2_VariableMetricMinimizer