Debian Codegraph @

src/Sum.h

raw
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