https://github.com/ekg/freebayes
Raw File
Tip revision: 71f68378efe2d720c540d63ebecb4a209b80a4b0 authored by Erik Garrison on 06 January 2020, 14:44:46 UTC
correct race in makefile
Tip revision: 71f6837
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