/usr/include/openturns/swig/Basis.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 | // SWIG file Basis.i
// Author : $LastChangedBy: dutka $
// Date : $LastChangedDate: 2009-11-09 17:38:15 +0100 (Mon, 09 Nov 2009) $
// Id : $Id: Basis.i 1403 2009-11-09 16:38:15Z dutka $
%{
#include "Basis.hxx"
namespace OpenTURNS {
template <>
struct traitsPythonType<OpenTURNS::Base::Func::Basis>
{
typedef _PySequence_ Type;
};
template <>
inline
OpenTURNS::Base::Func::Basis
convert<_PySequence_,OpenTURNS::Base::Func::Basis>(PyObject * pyObj)
{
if (!OpenTURNS::isAPythonSequenceOf<OpenTURNS::_PyObject_>( pyObj )) {
throw OT::Base::Common::InvalidArgumentException(HERE) << "Argument is not a sequence of objects";
}
OpenTURNS::Pointer<Base::Type::Collection<OpenTURNS::Base::Func::NumericalMathFunction> > ptr = buildCollectionFromPySequence<OpenTURNS::Base::Func::NumericalMathFunction>(pyObj);
return OpenTURNS::Base::Func::Basis( *ptr );
}
} /* namespace OpenTURNS */
%}
%template(NumericalMathFunctionCollection) OpenTURNS::Base::Type::Collection<OpenTURNS::Base::Func::NumericalMathFunction>;
%template(NumericalMathFunctionPersistentCollection) OpenTURNS::Base::Type::PersistentCollection<OpenTURNS::Base::Func::NumericalMathFunction>;
%include Basis.hxx
namespace OpenTURNS { namespace Base { namespace Func {
%extend Basis {
Basis(const Basis & other)
{
return new OpenTURNS::Base::Func::Basis(other);
}
Basis(PyObject * pyObj)
{
return new OpenTURNS::Base::Func::Basis( OpenTURNS::convert<OpenTURNS::_PySequence_,OpenTURNS::Base::Func::Basis>(pyObj) );
}
}
}}}
|