https://github.com/ekg/freebayes
Tip revision: ffcee0d8719ffdbbf0aa7059b83999fb3fc9d810 authored by Erik Garrison on 03 June 2019, 13:16:34 UTC
avoid hanging in super low entropy sequence
avoid hanging in super low entropy sequence
Tip revision: ffcee0d
Sum.h
#ifndef __SUM_H
#define __SUM_H
#include <vector>
template <class T>
T sum(const std::vector<T>& v) {
T result = 0;
for (typename std::vector<T>::const_iterator i = v.begin(); i != v.end(); ++i) {
result += *i;
}
return result;
}
#endif