File indexing completed on 2025-01-30 10:22:11
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef ROOT_Minuit2_CombinedMinimumBuilder
0011 #define ROOT_Minuit2_CombinedMinimumBuilder
0012
0013 #include "Minuit2/MinimumBuilder.h"
0014 #include "Minuit2/VariableMetricMinimizer.h"
0015 #include "Minuit2/SimplexMinimizer.h"
0016
0017 namespace ROOT {
0018
0019 namespace Minuit2 {
0020
0021 class CombinedMinimumBuilder : public MinimumBuilder {
0022
0023 public:
0024 CombinedMinimumBuilder() : fVMMinimizer(VariableMetricMinimizer()), fSimplexMinimizer(SimplexMinimizer()) {}
0025
0026 ~CombinedMinimumBuilder() override {}
0027
0028 FunctionMinimum Minimum(const MnFcn &, const GradientCalculator &, const MinimumSeed &, const MnStrategy &,
0029 unsigned int, double) const override;
0030
0031
0032 void SetPrintLevel(int level) override
0033 {
0034 MinimumBuilder::SetPrintLevel(level);
0035 fVMMinimizer.Builder().SetPrintLevel(level);
0036 fSimplexMinimizer.Builder().SetPrintLevel(level);
0037 }
0038 void SetStorageLevel(int level) override
0039 {
0040 MinimumBuilder::SetStorageLevel(level);
0041 fVMMinimizer.Builder().SetStorageLevel(level);
0042 fSimplexMinimizer.Builder().SetStorageLevel(level);
0043 }
0044
0045
0046 void SetTraceObject(MnTraceObject &obj) override
0047 {
0048 MinimumBuilder::SetTraceObject(obj);
0049 fVMMinimizer.Builder().SetTraceObject(obj);
0050 fSimplexMinimizer.Builder().SetTraceObject(obj);
0051 }
0052
0053 private:
0054 VariableMetricMinimizer fVMMinimizer;
0055 SimplexMinimizer fSimplexMinimizer;
0056 };
0057
0058 }
0059
0060 }
0061
0062 #endif