File indexing completed on 2025-01-30 10:22:11
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef ROOT_Minuit2_HessianGradientCalculator
0011 #define ROOT_Minuit2_HessianGradientCalculator
0012
0013 #include "Minuit2/GradientCalculator.h"
0014 #include "Minuit2/MnMatrix.h"
0015 #include <utility>
0016
0017 namespace ROOT {
0018
0019 namespace Minuit2 {
0020
0021 class MnFcn;
0022 class MnUserTransformation;
0023 class MnMachinePrecision;
0024 class MnStrategy;
0025
0026
0027
0028
0029
0030 class HessianGradientCalculator : public GradientCalculator {
0031
0032 public:
0033 HessianGradientCalculator(const MnFcn &fcn, const MnUserTransformation &par, const MnStrategy &stra)
0034 : fFcn(fcn), fTransformation(par), fStrategy(stra)
0035 {
0036 }
0037
0038 ~HessianGradientCalculator() override {}
0039
0040 FunctionGradient operator()(const MinimumParameters &) const override;
0041
0042 FunctionGradient operator()(const MinimumParameters &, const FunctionGradient &) const override;
0043
0044 std::pair<FunctionGradient, MnAlgebraicVector>
0045 DeltaGradient(const MinimumParameters &, const FunctionGradient &) const;
0046
0047 const MnFcn &Fcn() const { return fFcn; }
0048 const MnUserTransformation &Trafo() const { return fTransformation; }
0049 const MnMachinePrecision &Precision() const;
0050 const MnStrategy &Strategy() const { return fStrategy; }
0051
0052 unsigned int Ncycle() const;
0053 double StepTolerance() const;
0054 double GradTolerance() const;
0055
0056 private:
0057 const MnFcn &fFcn;
0058 const MnUserTransformation &fTransformation;
0059 const MnStrategy &fStrategy;
0060 };
0061
0062 }
0063
0064 }
0065
0066 #endif