☰
Debian Codegraph
@
1.3.9-2
/
/
src
/
Sum.h
☽
☼
src/Sum.h
code
plain
raw
MIT
2010-2014 Erik Garrison, Gabor Marth
debian/copyright
1
#ifndef FREEBAYES_SUM_H
2
#define FREEBAYES_SUM_H
3
4
#include <vector>
5
6
template <class T>
7
T sum(const std::vector<T>& v) {
8
T result = 0;
9
for (typename std::vector<T>::const_iterator i = v.begin(); i != v.end(); ++i) {
10
result += *i;
11
}
12
return result;
13
}
14
15
#endif