File indexing completed on 2025-01-30 10:22:13
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef ROOT_Minuit2_MnSimplex
0011 #define ROOT_Minuit2_MnSimplex
0012
0013 #include "Minuit2/MnApplication.h"
0014 #include "Minuit2/SimplexMinimizer.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
0033
0034
0035 class MnSimplex : public MnApplication {
0036
0037 public:
0038
0039 MnSimplex(const FCNBase &fcn, const std::vector<double> &par, const std::vector<double> &err, unsigned int stra = 1)
0040 : MnApplication(fcn, MnUserParameterState(par, err), MnStrategy(stra)), fMinimizer(SimplexMinimizer())
0041 {
0042 }
0043
0044
0045 MnSimplex(const FCNBase &fcn, const std::vector<double> &par, unsigned int nrow, const std::vector<double> &cov,
0046 unsigned int stra = 1)
0047 : MnApplication(fcn, MnUserParameterState(par, cov, nrow), MnStrategy(stra)), fMinimizer(SimplexMinimizer())
0048 {
0049 }
0050
0051
0052 MnSimplex(const FCNBase &fcn, const std::vector<double> &par, const MnUserCovariance &cov, unsigned int stra = 1)
0053 : MnApplication(fcn, MnUserParameterState(par, cov), MnStrategy(stra)), fMinimizer(SimplexMinimizer())
0054 {
0055 }
0056
0057
0058 MnSimplex(const FCNBase &fcn, const MnUserParameters &par, unsigned int stra = 1)
0059 : MnApplication(fcn, MnUserParameterState(par), MnStrategy(stra)), fMinimizer(SimplexMinimizer())
0060 {
0061 }
0062
0063
0064 MnSimplex(const FCNBase &fcn, const MnUserParameters &par, const MnUserCovariance &cov, unsigned int stra = 1)
0065 : MnApplication(fcn, MnUserParameterState(par, cov), MnStrategy(stra)), fMinimizer(SimplexMinimizer())
0066 {
0067 }
0068
0069
0070 MnSimplex(const FCNBase &fcn, const MnUserParameterState &par, const MnStrategy &str)
0071 : MnApplication(fcn, MnUserParameterState(par), str), fMinimizer(SimplexMinimizer())
0072 {
0073 }
0074
0075 MnSimplex(const MnSimplex &migr)
0076 : MnApplication(migr.Fcnbase(), migr.State(), migr.Strategy(), migr.NumOfCalls()), fMinimizer(migr.fMinimizer)
0077 {
0078 }
0079
0080 ~MnSimplex() override {}
0081
0082 ModularFunctionMinimizer &Minimizer() override { return fMinimizer; }
0083 const ModularFunctionMinimizer &Minimizer() const override { return fMinimizer; }
0084
0085 private:
0086 SimplexMinimizer fMinimizer;
0087
0088 private:
0089
0090 MnSimplex &operator=(const MnSimplex &) { return *this; }
0091 };
0092
0093 }
0094
0095 }
0096
0097 #endif