12
%template(IntList) list<int>;
15
%template(DoubleList) std::list<double>;
22
%template(RealList) list<Real>;
27
double average(std::list<int> v) {
28
return std::accumulate(v.begin(),v.end(),0.0)/v.size();
32
void halve_in_place(std::list<double>& v) {
33
std::transform(v.begin(),v.end(),v.begin(),
34
std::bind2nd(std::divides<double>(),2.0));
39
Struct() : num(0.0) {}
40
Struct(double d) : num(d) {}
41
// bool operator==(const Struct &other) { return (num == other.num); }