https://github.com/ekg/freebayes
Raw File
Tip revision: 9965815a4bc30420cd1697bb5ae5d5013e3557a3 authored by Erik Garrison on 05 October 2019, 21:38:02 UTC
can we get away without sorting and removing "non-unique" alleles?
Tip revision: 9965815
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