https://github.com/ekg/freebayes
Raw File
Tip revision: 8942eac372e0c5e9c769fd8ccfd4885bcdbfef87 authored by Erik Garrison on 06 January 2020, 21:21:56 UTC
continue specifying dependencies
Tip revision: 8942eac
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
back to top