This file is indexed.

/usr/include/openturns/swig/Copula.i is in libopenturns-dev 0.15-2.

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
78
79
80
81
82
83
84
85
86
// SWIG file Copula.i
// Author : $LastChangedBy: souchaud $
// Date : $LastChangedDate: 2011-04-05 17:50:07 +0200 (Tue, 05 Apr 2011) $
// Id : $Id: Copula.i 1855 2011-04-05 15:50:07Z souchaud $

%{
#include "PythonWrappingFunctions.hxx"
#include "Copula.hxx"

namespace OpenTURNS { 

  template <>
  struct traitsPythonType<OpenTURNS::Uncertainty::Model::Copula>
  {
    typedef _PyObject_ Type;
  };

  template <>
  inline
  OpenTURNS::Uncertainty::Model::Copula
  convert<_PyObject_,OpenTURNS::Uncertainty::Model::Copula>(PyObject * pyObj)
  {
    void * ptr = 0;
    if (SWIG_IsOK(SWIG_ConvertPtr( pyObj, &ptr, SWIGTYPE_p_OpenTURNS__Uncertainty__Model__Copula, 0 |  0 ))) {
      OpenTURNS::Uncertainty::Model::Copula * p_copula = reinterpret_cast< OpenTURNS::Uncertainty::Model::Copula * >( ptr );
      return *p_copula;

    } else if (SWIG_IsOK(SWIG_ConvertPtr( pyObj, &ptr, SWIGTYPE_p_OpenTURNS__Uncertainty__Model__CopulaImplementation, 0 |  0 ))) {
      OpenTURNS::Uncertainty::Model::CopulaImplementation * p_copula = reinterpret_cast< OpenTURNS::Uncertainty::Model::CopulaImplementation * >( ptr );
      return *p_copula;

    } else if (SWIG_IsOK(SWIG_ConvertPtr( pyObj, &ptr, SWIGTYPE_p_OpenTURNS__Uncertainty__Model__Distribution, 0 |  0 ))) {
      OpenTURNS::Uncertainty::Model::Distribution * p_dist = reinterpret_cast< OpenTURNS::Uncertainty::Model::Distribution * >( ptr );
      return *p_dist;

    } else if (SWIG_IsOK(SWIG_ConvertPtr( pyObj, &ptr, SWIGTYPE_p_OpenTURNS__Uncertainty__Model__DistributionImplementation, 0 |  0 ))) {
      OpenTURNS::Uncertainty::Model::DistributionImplementation * p_dist = reinterpret_cast< OpenTURNS::Uncertainty::Model::DistributionImplementation * >( ptr );
      return *p_dist;

    } else if (isAPython<_PySequence_>( pyObj )) {
      check<_PySequence_>( pyObj );
      PyObject * newPyObj = PySequence_Fast( pyObj, "" );

      const UnsignedLong size = PySequence_Fast_GET_SIZE( newPyObj );
      if (size != 2) {
        throw OpenTURNS::Base::Common::InvalidArgumentException(HERE) << "Sequence object has incorrect size " << size << ". Must be 2.";
      }
      PyObject * elt1 = PySequence_Fast_GET_ITEM( newPyObj, 0 );
      check<_PyObject_>( elt1 );
      PyObject * elt2 = PySequence_Fast_GET_ITEM( newPyObj, 1 );
      check<_PyString_>( elt2 );
      OpenTURNS::Uncertainty::Model::Copula copula = convert<_PyObject_,OpenTURNS::Uncertainty::Model::Copula>( elt1 );
      copula.setName( convert<_PyString_,OpenTURNS::String>( elt2 ) );


      Py_XDECREF( newPyObj );
      return copula;

    } else {
      throw OpenTURNS::Base::Common::InvalidArgumentException(HERE) << "Object passed as argument is neither a Copula nor an object convertible to a Copula";
    }
    return OpenTURNS::Uncertainty::Model::Copula();
  }

} /* namespace OpenTURNS */

%}

%typemap(in) const Copula & ($1_basetype temp) {
  if (! SWIG_IsOK(SWIG_ConvertPtr($input, (void **) &$1, $1_descriptor, 0))) {
    OpenTURNS::Uncertainty::Model::CopulaImplementation * p_impl = 0;
    if (SWIG_IsOK(SWIG_ConvertPtr($input, (void **) &p_impl, SWIG_TypeQuery("OpenTURNS::Uncertainty::Model::CopulaImplementation *"), 0))) {
      temp = OpenTURNS::Uncertainty::Model::Copula( *p_impl );
      $1 = &temp;
    } else throw OpenTURNS::Base::Common::InvalidArgumentException(HERE) << "Object is not convertible to a distribution";
  }
}

%typemap(typecheck,precedence=SWIG_TYPECHECK_POINTER) const Copula & {
  $1 = SWIG_IsOK(SWIG_ConvertPtr($input, NULL, $1_descriptor, 0)) || SWIG_IsOK(SWIG_ConvertPtr($input, NULL, SWIG_TypeQuery("OpenTURNS::Uncertainty::Model::CopulaImplementation *"), 0));
}

%apply const Copula & { const Model::Copula &, const Uncertainty::Model::Copula &, const OpenTURNS::Uncertainty::Model::Copula & };

%include Copula.hxx
namespace OpenTURNS { namespace Uncertainty { namespace Model { %extend Copula { Copula(const Copula & other) { return new OpenTURNS::Uncertainty::Model::Copula(other); } } }}}