Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
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
16
17namespace ROOT {
18
19namespace Minuit2 {
20
21// extern StackAllocator gStackAllocator;
22
24
25private:
26public:
27 explicit BasicFunctionGradient(unsigned int n)
29 fValid(false), fAnalytical(false)
30 {
31 }
32
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;
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
73private:
77 bool fValid;
79};
80
81} // namespace Minuit2
82
83} // namespace ROOT
84
85#endif // ROOT_Minuit2_BasicFunctionGradient
BasicFunctionGradient(const BasicFunctionGradient &grad)
const MnAlgebraicVector & G2() const
BasicFunctionGradient(const MnAlgebraicVector &grd, const MnAlgebraicVector &g2, const MnAlgebraicVector &gstep)
const MnAlgebraicVector & Vec() const
const MnAlgebraicVector & Gstep() const
BasicFunctionGradient & operator=(const BasicFunctionGradient &grad)
const MnAlgebraicVector & Grad() const
BasicFunctionGradient(const MnAlgebraicVector &grd)
static StackAllocator & Get()
void * Allocate(size_t nBytes)
const Int_t n
Definition legend1.C:16
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...