/usr/include/openturns/swig/RandomVector.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 | // SWIG file RandomVector.i
// Author : $LastChangedBy: souchaud $
// Date : $LastChangedDate: 2011-04-05 17:50:07 +0200 (Tue, 05 Apr 2011) $
// Id : $Id: RandomVector.i 1855 2011-04-05 15:50:07Z souchaud $
%{
#include "RandomVector.hxx"
%}
%template(RandomVectorImplementationTypedInterfaceObject) OpenTURNS::Base::Common::TypedInterfaceObject<OpenTURNS::Uncertainty::Model::RandomVectorImplementation>;
%typemap(in) const RandomVector & ($1_basetype temp) {
if (! SWIG_IsOK(SWIG_ConvertPtr($input, (void **) &$1, $1_descriptor, 0))) {
OpenTURNS::Uncertainty::Model::RandomVectorImplementation * p_impl = 0;
if (SWIG_IsOK(SWIG_ConvertPtr($input, (void **) &p_impl, SWIG_TypeQuery("OpenTURNS::Uncertainty::Model::RandomVectorImplementation *"), 0))) {
temp = OpenTURNS::Uncertainty::Model::RandomVector( *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 RandomVector & {
$1 = SWIG_IsOK(SWIG_ConvertPtr($input, NULL, $1_descriptor, 0)) || SWIG_IsOK(SWIG_ConvertPtr($input, NULL, SWIG_TypeQuery("OpenTURNS::Uncertainty::Model::RandomVectorImplementation *"), 0));
}
%include RandomVector.hxx
namespace OpenTURNS { namespace Uncertainty { namespace Model { %extend RandomVector { RandomVector(const RandomVector & other) { return new OpenTURNS::Uncertainty::Model::RandomVector(other); } } }}}
//namespace OpenTURNS { namespace Uncertainty { namespace Model { %extend RandomVector { RandomVector(const OpenTURNS::Uncertainty::Model::DistributionImplementation & distribution) { return new OpenTURNS::Uncertainty::Model::RandomVector(distribution); } } }}}
|