This file is indexed.

/usr/include/root/TPyFitFunction.h is in libroot-bindings-python-dev 5.34.14-1build1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
// Author: Wim Lavrijsen   November 2010

#ifndef ROOT_TPyFitFunction
#define ROOT_TPyFitFunction

//////////////////////////////////////////////////////////////////////////////
//                                                                          //
// TPyFitFunction                                                           //
//                                                                          //
// Python base class to work with Math::IMultiGenFunction                   //
//                                                                          //
//////////////////////////////////////////////////////////////////////////////


//- ROOT
#ifndef ROOT_Math_IFunction
#include "Math/IFunction.h"
#endif

// Python
struct _object;
typedef _object PyObject;


class TPyMultiGenFunction : public ROOT::Math::IMultiGenFunction {
public:
// ctor/dtor, and assignment
   TPyMultiGenFunction( PyObject* self = 0 );
   virtual ~TPyMultiGenFunction();

// Math::IMultiGenFunction implementation
   virtual ROOT::Math::IBaseFunctionMultiDim* Clone() const
      { return new TPyMultiGenFunction( fPySelf ); }
   virtual unsigned int NDim() const;
   virtual double DoEval( const double* x ) const;

   ClassDef( TPyMultiGenFunction, 1 );   //Python for Math::IMultiGenFunction equivalent

private:
// to prevent confusion when handing 'self' from python
   TPyMultiGenFunction( const TPyMultiGenFunction& src ) : ROOT::Math::IMultiGenFunction( src ) {}
   TPyMultiGenFunction& operator=( const TPyMultiGenFunction& ) { return *this; }

private:
   PyObject* fPySelf;              //! actual python object
};


class TPyMultiGradFunction : public ROOT::Math::IMultiGradFunction {
public:
// ctor/dtor, and assignment
   TPyMultiGradFunction( PyObject* self = 0 );
   virtual ~TPyMultiGradFunction();

// Math::IMultiGenFunction implementation
   virtual ROOT::Math::IBaseFunctionMultiDim* Clone() const
      { return new TPyMultiGradFunction( fPySelf ); }
   virtual unsigned int NDim() const;
   virtual double DoEval( const double* x ) const;

   virtual void Gradient( const double* x, double* grad ) const;
   virtual void FdF( const double* x, double& f, double* df ) const;
   virtual double DoDerivative( const double * x, unsigned int icoord ) const;

   ClassDef( TPyMultiGradFunction, 1 );   //Python for Math::IMultiGradFunction equivalent

private:
// to prevent confusion when handing 'self' from python
   TPyMultiGradFunction( const TPyMultiGradFunction& src ) :
       ROOT::Math::IMultiGenFunction( src ), ROOT::Math::IMultiGradFunction( src ) {}
   TPyMultiGradFunction& operator=( const TPyMultiGradFunction& ) { return *this; }

private:
   PyObject* fPySelf;              //! actual python object
};

#endif