File indexing completed on 2025-01-18 10:10:24
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef ROOT_Minuit2_MinimumParameters
0011 #define ROOT_Minuit2_MinimumParameters
0012
0013 #include "Minuit2/MnMatrix.h"
0014
0015 namespace ROOT {
0016
0017 namespace Minuit2 {
0018
0019 class MinimumParameters {
0020
0021 public:
0022 MinimumParameters(unsigned int n, double fval = 0)
0023 : fPtr{new Data{MnAlgebraicVector(n), MnAlgebraicVector(n), fval, false, false}}
0024 {
0025 }
0026
0027
0028 MinimumParameters(const MnAlgebraicVector &avec, double fval)
0029 : fPtr{new Data{avec, MnAlgebraicVector(avec.size()), fval, true, false}}
0030 {
0031 }
0032
0033
0034 MinimumParameters(const MnAlgebraicVector &avec, const MnAlgebraicVector &dirin, double fval)
0035 : fPtr{new Data{avec, dirin, fval, true, true}}
0036 {
0037 }
0038
0039 const MnAlgebraicVector &Vec() const { return fPtr->fParameters; }
0040 const MnAlgebraicVector &Dirin() const { return fPtr->fStepSize; }
0041 double Fval() const { return fPtr->fFVal; }
0042 bool IsValid() const { return fPtr->fValid; }
0043 bool HasStepSize() const { return fPtr->fHasStep; }
0044
0045 private:
0046 struct Data {
0047 MnAlgebraicVector fParameters;
0048 MnAlgebraicVector fStepSize;
0049 double fFVal;
0050 bool fValid;
0051 bool fHasStep;
0052 };
0053
0054 std::shared_ptr<Data> fPtr;
0055 };
0056
0057 }
0058
0059 }
0060
0061 #endif