ROOT   Reference Guide
Searching...
No Matches
MinimumParameters.h
Go to the documentation of this file.
1// @(#)root/minuit2:$Id$
2// Authors: M. Winkler, F. James, L. Moneta, A. Zsenei 2003-2005
3
4/**********************************************************************
5 * *
6 * Copyright (c) 2005 LCG ROOT Math team, CERN/PH-SFT *
7 * *
8 **********************************************************************/
9
10#ifndef ROOT_Minuit2_MinimumParameters
11#define ROOT_Minuit2_MinimumParameters
12
13#include "Minuit2/MnMatrix.h"
14
15namespace ROOT {
16
17namespace Minuit2 {
18
20
21public:
22 MinimumParameters(unsigned int n, double fval = 0)
23 : fPtr{new Data{MnAlgebraicVector(n), MnAlgebraicVector(n), fval, false, false}}
24 {
25 }
26
27 /** takes the Parameter vector */
28 MinimumParameters(const MnAlgebraicVector &avec, double fval)
29 : fPtr{new Data{avec, MnAlgebraicVector(avec.size()), fval, true, false}}
30 {
31 }
32
33 /** takes the Parameter vector plus step size x1 - x0 = dirin */
34 MinimumParameters(const MnAlgebraicVector &avec, const MnAlgebraicVector &dirin, double fval)
35 : fPtr{new Data{avec, dirin, fval, true, true}}
36 {
37 }
38
39 const MnAlgebraicVector &Vec() const { return fPtr->fParameters; }
40 const MnAlgebraicVector &Dirin() const { return fPtr->fStepSize; }
41 double Fval() const { return fPtr->fFVal; }
42 bool IsValid() const { return fPtr->fValid; }
43 bool HasStepSize() const { return fPtr->fHasStep; }
44
45private:
46 struct Data {
49 double fFVal;
50 bool fValid;
52 };
53
54 std::shared_ptr<Data> fPtr;
55};
56
57} // namespace Minuit2
58
59} // namespace ROOT
60
61#endif // ROOT_Minuit2_MinimumParameters
size_t size(const MatrixT &matrix)
retrieve the size of a square matrix
const MnAlgebraicVector & Dirin() const
MinimumParameters(const MnAlgebraicVector &avec, double fval)
takes the Parameter vector
MinimumParameters(unsigned int n, double fval=0)
MinimumParameters(const MnAlgebraicVector &avec, const MnAlgebraicVector &dirin, double fval)
takes the Parameter vector plus step size x1 - x0 = dirin
const MnAlgebraicVector & Vec() const
const Int_t n
Definition legend1.C:16
This file contains a specialised ROOT message handler to test for diagnostic in unit tests.