Logo ROOT   6.16/01
Reference Guide
BasicMinimumParameters.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_BasicMinimumParameters
11#define ROOT_Minuit2_BasicMinimumParameters
12
13#include "Minuit2/MnMatrix.h"
14
16
17namespace ROOT {
18
19 namespace Minuit2 {
20
21
22//extern StackAllocator gStackAllocator;
23
25
26public:
27
28 BasicMinimumParameters(unsigned int n, double fval) : fParameters(MnAlgebraicVector(n)), fStepSize(MnAlgebraicVector(n)), fFVal(fval), fValid(false), fHasStep(false) {}
29
30 BasicMinimumParameters(const MnAlgebraicVector& avec, double fval) :
31 fParameters(avec), fStepSize(avec.size()), fFVal(fval), fValid(true), fHasStep(false) {}
32
33 BasicMinimumParameters(const MnAlgebraicVector& avec, const MnAlgebraicVector& dirin, double fval) : fParameters(avec), fStepSize(dirin), fFVal(fval), fValid(true), fHasStep(true) {}
34
36
38
41 fStepSize = par.fStepSize;
42 fFVal = par.fFVal;
43 fValid = par.fValid;
44 fHasStep = par.fHasStep;
45 return *this;
46 }
47
48 void* operator new(size_t nbytes) {
49 return StackAllocatorHolder::Get().Allocate(nbytes);
50 }
51
52 void operator delete(void* p, size_t /*nbytes*/) {
54 }
55
56 const MnAlgebraicVector& Vec() const {return fParameters;}
57 const MnAlgebraicVector& Dirin() const {return fStepSize;}
58 double Fval() const {return fFVal;}
59 bool IsValid() const {return fValid;}
60 bool HasStepSize() const {return fHasStep;}
61
62private:
63
66 double fFVal;
67 bool fValid;
69};
70
71 } // namespace Minuit2
72
73} // namespace ROOT
74
75#endif // ROOT_Minuit2_BasicMinimumParameters
const MnAlgebraicVector & Vec() const
BasicMinimumParameters(const MnAlgebraicVector &avec, const MnAlgebraicVector &dirin, double fval)
const MnAlgebraicVector & Dirin() const
BasicMinimumParameters & operator=(const BasicMinimumParameters &par)
BasicMinimumParameters(const BasicMinimumParameters &par)
BasicMinimumParameters(const MnAlgebraicVector &avec, double fval)
BasicMinimumParameters(unsigned int n, double fval)
static StackAllocator & Get()
void * Allocate(size_t nBytes)
const Int_t n
Definition: legend1.C:16
Namespace for new ROOT classes and functions.
Definition: StringConv.hxx:21