Warning, file /include/root/TLinearMinimizer.h was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013 #ifndef ROOT_TLinearMinimizer
0014 #define ROOT_TLinearMinimizer
0015
0016 #include "Math/Minimizer.h"
0017
0018 #include "Rtypes.h"
0019
0020 #include <vector>
0021 #include <string>
0022
0023 class TLinearFitter;
0024
0025
0026
0027
0028
0029
0030
0031 class TLinearMinimizer : public ROOT::Math::Minimizer {
0032
0033 public:
0034
0035
0036
0037
0038 TLinearMinimizer (int type = 0);
0039
0040
0041
0042
0043 TLinearMinimizer ( const char * type );
0044
0045
0046
0047
0048 ~TLinearMinimizer () override;
0049
0050 private:
0051
0052
0053
0054
0055
0056 TLinearMinimizer(const TLinearMinimizer &);
0057
0058
0059
0060
0061 TLinearMinimizer & operator = (const TLinearMinimizer & rhs);
0062
0063 public:
0064
0065
0066 void SetFunction(const ROOT::Math::IMultiGenFunction & func) override;
0067
0068
0069 bool SetVariable(unsigned int , const std::string & , double , double ) override { return true; }
0070
0071
0072 bool SetFixedVariable(unsigned int , const std::string & , double ) override;
0073
0074
0075 bool Minimize() override;
0076
0077
0078 double MinValue() const override { return fMinVal; }
0079
0080
0081 double Edm() const override { return 0; }
0082
0083
0084 const double * X() const override { return &fParams.front(); }
0085
0086
0087 const double * MinGradient() const override { return nullptr; }
0088
0089
0090 unsigned int NCalls() const override { return 0; }
0091
0092
0093
0094 unsigned int NDim() const override { return fDim; }
0095
0096
0097
0098 unsigned int NFree() const override { return fNFree; }
0099
0100
0101 bool ProvidesError() const override { return true; }
0102
0103
0104 const double * Errors() const override { return fErrors.empty() ? nullptr : &fErrors.front(); }
0105
0106
0107
0108
0109
0110 double CovMatrix(unsigned int i, unsigned int j) const override {
0111 return (fCovar.empty()) ? 0 : fCovar[i + fDim* j];
0112 }
0113
0114
0115 int CovMatrixStatus() const override {
0116 if (fCovar.empty()) return 0;
0117 return (fStatus ==0) ? 3 : 1;
0118 }
0119
0120
0121
0122
0123
0124
0125
0126 protected:
0127
0128 private:
0129
0130 bool fRobust;
0131 unsigned int fDim;
0132 unsigned int fNFree;
0133 double fMinVal;
0134 std::vector<double> fParams;
0135 std::vector<double> fErrors;
0136 std::vector<double> fCovar;
0137
0138 const ROOT::Math::IMultiGradFunction * fObjFunc;
0139 TLinearFitter * fFitter;
0140
0141 ClassDef(TLinearMinimizer,1)
0142
0143 };
0144
0145
0146
0147 #endif