MCPcopy Create free account
hub / github.com/NatLabRockies/OpenStudio / mean

Function mean

src/utilities/data/Vector.cpp:312–319  ·  view source on GitHub ↗

mean

Source from the content-addressed store, hash-verified

310
311/// mean
312double mean(const Vector& vector) {
313 double avg = 0;
314 size_t N = vector.size();
315 if (N > 0) {
316 avg = sum(vector) / N;
317 }
318 return avg;
319}
320
321/// variance
322double variance(const Vector& vector) {

Callers 1

varianceFunction · 0.70

Calls 2

sumFunction · 0.70
sizeMethod · 0.45

Tested by

no test coverage detected