File indexing completed on 2025-01-30 10:22:11
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef ROOT_Minuit2_FumiliGradientCalculator
0011 #define ROOT_Minuit2_FumiliGradientCalculator
0012
0013 #include "Minuit2/AnalyticalGradientCalculator.h"
0014 #include "Minuit2/MnMatrix.h"
0015
0016 namespace ROOT {
0017
0018 namespace Minuit2 {
0019
0020 class FumiliFCNBase;
0021 class MnUserTransformation;
0022
0023
0024
0025 class FumiliGradientCalculator : public AnalyticalGradientCalculator {
0026
0027 public:
0028 FumiliGradientCalculator(const FumiliFCNBase &fcn, const MnUserTransformation &trafo, int n);
0029
0030 ~FumiliGradientCalculator() override {}
0031
0032 FunctionGradient operator()(const MinimumParameters &) const override;
0033
0034 FunctionGradient operator()(const MinimumParameters &, const FunctionGradient &) const override;
0035
0036 const MnUserTransformation &Trafo() const { return fTransformation; }
0037
0038 const MnAlgebraicSymMatrix &GetHessian() const { return fHessian; }
0039
0040 bool Hessian(const MinimumParameters &, MnAlgebraicSymMatrix &) const override;
0041
0042 bool G2(const MinimumParameters &, MnAlgebraicVector &) const override;
0043
0044 bool CanComputeG2() const override { return true;}
0045
0046 bool CanComputeHessian() const override { return true;}
0047
0048
0049 private:
0050 const FumiliFCNBase &fFcn;
0051 mutable MnAlgebraicSymMatrix fHessian;
0052 };
0053
0054 }
0055
0056 }
0057
0058 #endif