MCPcopy Create free account
hub / github.com/bananabr/TimeException / getAverage

Function getAverage

TimeException.cpp:54–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52
53template<typename T>
54double getAverage(std::vector<T> const& v) {
55 if (v.empty()) {
56 return 0;
57 }
58 return std::accumulate(v.begin(), v.end(), 0.0) / v.size();
59}
60
61vector<char> getRandomBytes(size_t size) {
62 random_device rd;

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected