Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
FunctionGradient.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_FunctionGradient
11#define ROOT_Minuit2_FunctionGradient
12
14
15#include <memory>
16
17namespace ROOT {
18
19namespace Minuit2 {
20
22
23private:
24public:
25 explicit FunctionGradient(unsigned int n) : fData(std::make_shared<BasicFunctionGradient>(n)) {}
26
27 // HD: this deep-copies, inconsistent to assignment?
28 explicit FunctionGradient(const MnAlgebraicVector &grd) : fData(std::make_shared<BasicFunctionGradient>(grd)) {}
29
31 : fData(std::make_shared<BasicFunctionGradient>(grd, g2, gstep))
32 {
33 }
34
36
37 // HD: assignment shares the pointer
38 FunctionGradient &operator=(const FunctionGradient & /*grad*/) = default;
39
40 const MnAlgebraicVector &Grad() const { return fData->Grad(); }
41 const MnAlgebraicVector &Vec() const { return fData->Vec(); }
42 bool IsValid() const { return fData->IsValid(); }
43
44 bool IsAnalytical() const { return fData->IsAnalytical(); }
45 const MnAlgebraicVector &G2() const { return fData->G2(); }
46 const MnAlgebraicVector &Gstep() const { return fData->Gstep(); }
47
48private:
49 std::shared_ptr<BasicFunctionGradient> fData;
50};
51
52} // namespace Minuit2
53
54} // namespace ROOT
55
56#endif // ROOT_Minuit2_FunctionGradient
std::shared_ptr< BasicFunctionGradient > fData
FunctionGradient & operator=(const FunctionGradient &)=default
const MnAlgebraicVector & Gstep() const
const MnAlgebraicVector & Grad() const
FunctionGradient(const MnAlgebraicVector &grd, const MnAlgebraicVector &g2, const MnAlgebraicVector &gstep)
const MnAlgebraicVector & Vec() const
FunctionGradient(const FunctionGradient &grad)
const MnAlgebraicVector & G2() const
FunctionGradient(const MnAlgebraicVector &grd)
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...