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

Function mean

src/utilities/data/Matrix.cpp:328–335  ·  view source on GitHub ↗

mean

Source from the content-addressed store, hash-verified

326
327/// mean
328double mean(const Matrix& matrix) {
329 double avg = 0;
330 size_t N = matrix.size1() * matrix.size2();
331 if (N > 0) {
332 avg = sum(matrix) / N;
333 }
334 return avg;
335}
336
337/// get the connected components from an NxN adjacency matrix (1.0 for i-j connected, 0.0 for i-j not connected)
338std::vector<std::vector<unsigned>> findConnectedComponents(const Matrix& matrix) {

Callers 2

TEST_FFunction · 0.50
TEST_FFunction · 0.50

Calls 1

sumFunction · 0.70

Tested by 2

TEST_FFunction · 0.40
TEST_FFunction · 0.40