Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:10:25

0001 // @(#)root/minuit2:$Id$
0002 // Authors: M. Winkler, F. James, L. Moneta, A. Zsenei   2003-2005
0003 
0004 /**********************************************************************
0005  *                                                                    *
0006  * Copyright (c) 2005 LCG ROOT Math team,  CERN/PH-SFT                *
0007  *                                                                    *
0008  **********************************************************************/
0009 
0010 #ifndef ROOT_Minuit2_Numerical2PGradientCalculator
0011 #define ROOT_Minuit2_Numerical2PGradientCalculator
0012 
0013 #include "Minuit2/MnConfig.h"
0014 
0015 #include "Minuit2/GradientCalculator.h"
0016 
0017 #include <vector>
0018 
0019 namespace ROOT {
0020 
0021 namespace Minuit2 {
0022 
0023 class MnFcn;
0024 class MnUserTransformation;
0025 class MnMachinePrecision;
0026 class MnStrategy;
0027 
0028 /**
0029    class performing the numerical gradient calculation
0030  */
0031 
0032 class Numerical2PGradientCalculator : public GradientCalculator {
0033 
0034 public:
0035    Numerical2PGradientCalculator(const MnFcn &fcn, const MnUserTransformation &par, const MnStrategy &stra)
0036       : fFcn(fcn), fTransformation(par), fStrategy(stra)
0037    {
0038    }
0039 
0040    ~Numerical2PGradientCalculator() override {}
0041 
0042    FunctionGradient operator()(const MinimumParameters &) const override;
0043 
0044    virtual FunctionGradient operator()(const std::vector<double> &params) const;
0045 
0046    FunctionGradient operator()(const MinimumParameters &, const FunctionGradient &) const override;
0047 
0048    const MnFcn &Fcn() const { return fFcn; }
0049    const MnUserTransformation &Trafo() const { return fTransformation; }
0050    const MnMachinePrecision &Precision() const;
0051    const MnStrategy &Strategy() const { return fStrategy; }
0052 
0053    unsigned int Ncycle() const;
0054    double StepTolerance() const;
0055    double GradTolerance() const;
0056 
0057 private:
0058    const MnFcn &fFcn;
0059    const MnUserTransformation &fTransformation;
0060    const MnStrategy &fStrategy;
0061 };
0062 
0063 } // namespace Minuit2
0064 
0065 } // namespace ROOT
0066 
0067 #endif // ROOT_Minuit2_Numerical2PGradientCalculator