1
%module lib_std_vectora
13
%template(vector_i) std::vector<int, std::allocator<int> >;
15
%template(matrix_i) std::vector<std::vector<int,std::allocator<int> >,std::allocator<std::vector<int,std::allocator<int> > > >;
20
std::vector<std::vector<int,std::allocator<int> >,
21
std::allocator<std::vector<int,std::allocator<int> > > >
24
std::vector<int> vident(const std::vector<int,std::allocator<int> >& v)
29
imatrix mident(const imatrix& v)
36
%template(DoubleVector) std::vector<double, std::allocator<double> >;
43
%template(RealVector) vector<Real, std::allocator<Real> >;
48
double average(std::vector<int, std::allocator<int> > v) {
49
return std::accumulate(v.begin(),v.end(),0.0)/v.size();
52
std::vector<Real,std::allocator<Real> >
53
half(const std::vector<Real,std::allocator<Real> >& v) {
54
std::vector<Real> w(v);
55
for (unsigned int i=0; i<w.size(); i++)
62
%template(IntPtrVector) std::vector<int *,std::allocator<int *> >;