Logo ROOT  
Reference Guide
BasicFunctionGradient.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_BasicFunctionGradient
11 #define ROOT_Minuit2_BasicFunctionGradient
12 
13 #include "Minuit2/MnMatrix.h"
14 
15 #include "Minuit2/StackAllocator.h"
16 
17 namespace ROOT {
18 
19 namespace Minuit2 {
20 
21 // extern StackAllocator gStackAllocator;
22 
24 
25 private:
26 public:
27  explicit BasicFunctionGradient(unsigned int n)
29  fValid(false), fAnalytical(false)
30  {
31  }
32 
34  : fGradient(grd), fG2ndDerivative(MnAlgebraicVector(grd.size())), fGStepSize(MnAlgebraicVector(grd.size())),
35  fValid(true), fAnalytical(true)
36  {
37  }
38 
40  : fGradient(grd), fG2ndDerivative(g2), fGStepSize(gstep), fValid(true), fAnalytical(false)
41  {
42  }
43 
45 
48  fValid(grad.fValid)
49  {
50  }
51 
53  {
54  fGradient = grad.fGradient;
56  fGStepSize = grad.fGStepSize;
57  fValid = grad.fValid;
58  return *this;
59  }
60 
61  void *operator new(size_t nbytes) { return StackAllocatorHolder::Get().Allocate(nbytes); }
62 
63  void operator delete(void *p, size_t /*nbytes */) { StackAllocatorHolder::Get().Deallocate(p); }
64 
65  const MnAlgebraicVector &Grad() const { return fGradient; }
66  const MnAlgebraicVector &Vec() const { return fGradient; }
67  bool IsValid() const { return fValid; }
68 
69  bool IsAnalytical() const { return fAnalytical; }
70  const MnAlgebraicVector &G2() const { return fG2ndDerivative; }
71  const MnAlgebraicVector &Gstep() const { return fGStepSize; }
72 
73 private:
77  bool fValid;
79 };
80 
81 } // namespace Minuit2
82 
83 } // namespace ROOT
84 
85 #endif // ROOT_Minuit2_BasicFunctionGradient
ROOT::Minuit2::BasicFunctionGradient::fGradient
MnAlgebraicVector fGradient
Definition: BasicFunctionGradient.h:74
ROOT::Minuit2::BasicFunctionGradient::Vec
const MnAlgebraicVector & Vec() const
Definition: BasicFunctionGradient.h:66
n
const Int_t n
Definition: legend1.C:16
ROOT::Minuit2::BasicFunctionGradient::BasicFunctionGradient
BasicFunctionGradient(const MnAlgebraicVector &grd, const MnAlgebraicVector &g2, const MnAlgebraicVector &gstep)
Definition: BasicFunctionGradient.h:39
ROOT::Minuit2::BasicFunctionGradient::BasicFunctionGradient
BasicFunctionGradient(const MnAlgebraicVector &grd)
Definition: BasicFunctionGradient.h:33
ROOT::Minuit2::LAVector
Definition: LAVector.h:32
ROOT::Minuit2::StackAllocator::Deallocate
void Deallocate(void *p)
Definition: StackAllocator.h:103
ROOT::Minuit2::BasicFunctionGradient::fAnalytical
bool fAnalytical
Definition: BasicFunctionGradient.h:78
MnMatrix.h
ROOT::Minuit2::BasicFunctionGradient::BasicFunctionGradient
BasicFunctionGradient(const BasicFunctionGradient &grad)
Definition: BasicFunctionGradient.h:46
ROOT::Minuit2::BasicFunctionGradient::Gstep
const MnAlgebraicVector & Gstep() const
Definition: BasicFunctionGradient.h:71
ROOT::Minuit2::BasicFunctionGradient
Definition: BasicFunctionGradient.h:23
ROOT::Minuit2::BasicFunctionGradient::fG2ndDerivative
MnAlgebraicVector fG2ndDerivative
Definition: BasicFunctionGradient.h:75
ROOT::Minuit2::BasicFunctionGradient::IsValid
bool IsValid() const
Definition: BasicFunctionGradient.h:67
ROOT::Minuit2::BasicFunctionGradient::fGStepSize
MnAlgebraicVector fGStepSize
Definition: BasicFunctionGradient.h:76
StackAllocator.h
ROOT::Minuit2::StackAllocator::Allocate
void * Allocate(size_t nBytes)
Definition: StackAllocator.h:71
ROOT::Minuit2::StackAllocatorHolder::Get
static StackAllocator & Get()
Definition: StackAllocator.h:223
ROOT::Minuit2::BasicFunctionGradient::IsAnalytical
bool IsAnalytical() const
Definition: BasicFunctionGradient.h:69
ROOT::Minuit2::BasicFunctionGradient::fValid
bool fValid
Definition: BasicFunctionGradient.h:77
ROOT::Minuit2::BasicFunctionGradient::G2
const MnAlgebraicVector & G2() const
Definition: BasicFunctionGradient.h:70
ROOT::Minuit2::BasicFunctionGradient::~BasicFunctionGradient
~BasicFunctionGradient()
Definition: BasicFunctionGradient.h:44
ROOT::Minuit2::BasicFunctionGradient::operator=
BasicFunctionGradient & operator=(const BasicFunctionGradient &grad)
Definition: BasicFunctionGradient.h:52
ROOT
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...
Definition: EExecutionPolicy.hxx:4
ROOT::Minuit2::BasicFunctionGradient::BasicFunctionGradient
BasicFunctionGradient(unsigned int n)
Definition: BasicFunctionGradient.h:27
ROOT::Minuit2::BasicFunctionGradient::Grad
const MnAlgebraicVector & Grad() const
Definition: BasicFunctionGradient.h:65