File indexing completed on 2025-01-30 10:22:13
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef ROOT_Minuit2_MnHesse
0011 #define ROOT_Minuit2_MnHesse
0012
0013 #include "Minuit2/MnConfig.h"
0014 #include "Minuit2/MnStrategy.h"
0015
0016 #include <vector>
0017
0018 namespace ROOT {
0019
0020 namespace Minuit2 {
0021
0022 class FCNBase;
0023 class MnUserParameterState;
0024 class MnUserParameters;
0025 class MnUserCovariance;
0026 class MnUserTransformation;
0027 class MinimumState;
0028 class MnMachinePrecision;
0029 class MnFcn;
0030 class FunctionMinimum;
0031 class FCNGradientBase;
0032
0033
0034
0035
0036
0037
0038
0039
0040 class MnHesse {
0041
0042 public:
0043
0044 MnHesse() : fStrategy(MnStrategy(1)) {}
0045
0046
0047 MnHesse(unsigned int stra) : fStrategy(MnStrategy(stra)) {}
0048
0049
0050 MnHesse(const MnStrategy &stra) : fStrategy(stra) {}
0051
0052 ~MnHesse() {}
0053
0054
0055
0056
0057
0058 MnUserParameterState operator()(const FCNBase &, const std::vector<double> &, const std::vector<double> &,
0059 unsigned int maxcalls = 0) const;
0060
0061 MnUserParameterState operator()(const FCNBase &, const std::vector<double> &, unsigned int nrow,
0062 const std::vector<double> &, unsigned int maxcalls = 0) const;
0063
0064 MnUserParameterState
0065 operator()(const FCNBase &, const std::vector<double> &, const MnUserCovariance &, unsigned int maxcalls = 0) const;
0066
0067
0068
0069
0070 MnUserParameterState operator()(const FCNBase &, const MnUserParameters &, unsigned int maxcalls = 0) const;
0071
0072 MnUserParameterState
0073 operator()(const FCNBase &, const MnUserParameters &, const MnUserCovariance &, unsigned int maxcalls = 0) const;
0074
0075 MnUserParameterState operator()(const FCNBase &, const MnUserParameterState &, unsigned int maxcalls = 0) const;
0076
0077
0078
0079
0080
0081 void operator()(const FCNBase &, FunctionMinimum &, unsigned int maxcalls = 0) const;
0082
0083
0084
0085 MinimumState
0086 operator()(const MnFcn &, const MinimumState &, const MnUserTransformation &, unsigned int maxcalls = 0) const;
0087
0088
0089 unsigned int Ncycles() const { return fStrategy.HessianNCycles(); }
0090 double Tolerstp() const { return fStrategy.HessianStepTolerance(); }
0091 double TolerG2() const { return fStrategy.HessianG2Tolerance(); }
0092
0093 private:
0094
0095
0096 MinimumState ComputeNumerical(const MnFcn &, const MinimumState &, const MnUserTransformation &, unsigned int maxcalls) const;
0097
0098
0099 MinimumState ComputeAnalytical(const FCNGradientBase &, const MinimumState &, const MnUserTransformation &) const;
0100
0101 MnStrategy fStrategy;
0102 };
0103
0104 }
0105
0106 }
0107
0108 #endif