File indexing completed on 2025-01-18 10:10:24
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef ROOT_Minuit2_MnMigrad
0011 #define ROOT_Minuit2_MnMigrad
0012
0013 #include "Minuit2/MnApplication.h"
0014 #include "Minuit2/VariableMetricMinimizer.h"
0015
0016 #include <vector>
0017
0018 namespace ROOT {
0019
0020 namespace Minuit2 {
0021
0022 class FCNBase;
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032 class MnMigrad : public MnApplication {
0033
0034 public:
0035
0036 MnMigrad(const FCNBase &fcn, const std::vector<double> &par, const std::vector<double> &err, unsigned int stra = 1)
0037 : MnApplication(fcn, MnUserParameterState(par, err), MnStrategy(stra)), fMinimizer(VariableMetricMinimizer())
0038 {
0039 }
0040
0041
0042 MnMigrad(const FCNBase &fcn, const std::vector<double> &par, unsigned int nrow, const std::vector<double> &cov,
0043 unsigned int stra = 1)
0044 : MnApplication(fcn, MnUserParameterState(par, cov, nrow), MnStrategy(stra)),
0045 fMinimizer(VariableMetricMinimizer())
0046 {
0047 }
0048
0049
0050 MnMigrad(const FCNBase &fcn, const std::vector<double> &par, const MnUserCovariance &cov, unsigned int stra = 1)
0051 : MnApplication(fcn, MnUserParameterState(par, cov), MnStrategy(stra)), fMinimizer(VariableMetricMinimizer())
0052 {
0053 }
0054
0055
0056 MnMigrad(const FCNBase &fcn, const MnUserParameters &par, unsigned int stra = 1)
0057 : MnApplication(fcn, MnUserParameterState(par), MnStrategy(stra)), fMinimizer(VariableMetricMinimizer())
0058 {
0059 }
0060
0061
0062 MnMigrad(const FCNBase &fcn, const MnUserParameters &par, const MnUserCovariance &cov, unsigned int stra = 1)
0063 : MnApplication(fcn, MnUserParameterState(par, cov), MnStrategy(stra)), fMinimizer(VariableMetricMinimizer())
0064 {
0065 }
0066
0067
0068 MnMigrad(const FCNBase &fcn, const MnUserParameterState &par, const MnStrategy &str)
0069 : MnApplication(fcn, MnUserParameterState(par), str), fMinimizer(VariableMetricMinimizer())
0070 {
0071 }
0072
0073
0074
0075
0076 MnMigrad(const FCNGradientBase &fcn, const std::vector<double> &par, const std::vector<double> &err,
0077 unsigned int stra = 1)
0078 : MnApplication(fcn, MnUserParameterState(par, err), MnStrategy(stra)), fMinimizer(VariableMetricMinimizer())
0079 {
0080 }
0081
0082
0083 MnMigrad(const FCNGradientBase &fcn, const std::vector<double> &par, unsigned int nrow,
0084 const std::vector<double> &cov, unsigned int stra = 1)
0085 : MnApplication(fcn, MnUserParameterState(par, cov, nrow), MnStrategy(stra)),
0086 fMinimizer(VariableMetricMinimizer())
0087 {
0088 }
0089
0090
0091 MnMigrad(const FCNGradientBase &fcn, const std::vector<double> &par, const MnUserCovariance &cov,
0092 unsigned int stra = 1)
0093 : MnApplication(fcn, MnUserParameterState(par, cov), MnStrategy(stra)), fMinimizer(VariableMetricMinimizer())
0094 {
0095 }
0096
0097
0098 MnMigrad(const FCNGradientBase &fcn, const MnUserParameters &par, unsigned int stra = 1)
0099 : MnApplication(fcn, MnUserParameterState(par), MnStrategy(stra)), fMinimizer(VariableMetricMinimizer())
0100 {
0101 }
0102
0103
0104 MnMigrad(const FCNGradientBase &fcn, const MnUserParameters &par, const MnUserCovariance &cov, unsigned int stra = 1)
0105 : MnApplication(fcn, MnUserParameterState(par, cov), MnStrategy(stra)), fMinimizer(VariableMetricMinimizer())
0106 {
0107 }
0108
0109
0110 MnMigrad(const FCNGradientBase &fcn, const MnUserParameterState &par, const MnStrategy &str)
0111 : MnApplication(fcn, MnUserParameterState(par), str), fMinimizer(VariableMetricMinimizer())
0112 {
0113 }
0114
0115 ~MnMigrad() override {}
0116
0117
0118 MnMigrad(const MnMigrad &) = default;
0119
0120
0121 MnMigrad &operator=(const MnMigrad &) = delete;
0122
0123 ModularFunctionMinimizer &Minimizer() override { return fMinimizer; }
0124 const ModularFunctionMinimizer &Minimizer() const override { return fMinimizer; }
0125
0126 private:
0127 VariableMetricMinimizer fMinimizer;
0128 };
0129
0130 }
0131
0132 }
0133
0134 #endif