more tests
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5784 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
a784bf2f32
commit
7e25ede10d
13 changed files with 161 additions and 18 deletions
|
|
@ -28,9 +28,9 @@ double average(std::vector<int> v) {
|
|||
return std::accumulate(v.begin(),v.end(),0.0)/v.size();
|
||||
}
|
||||
|
||||
std::vector<float> half(const std::vector<float>& v) {
|
||||
std::vector<float> w(v);
|
||||
for (unsigned int i=0; i<w.size(); i++)
|
||||
std::vector<Real> half(const std::vector<Real>& v) {
|
||||
std::vector<Real> w(v);
|
||||
for (std::vector<Real>::size_type i=0; i<w.size(); i++)
|
||||
w[i] /= 2.0;
|
||||
return w;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue