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

Function sum

src/utilities/data/Matrix.cpp:289–297  ·  view source on GitHub ↗

sum

Source from the content-addressed store, hash-verified

287
288/// sum
289double sum(const Matrix& matrix) {
290 double result = 0.0;
291 for (unsigned i = 0; i < matrix.size1(); ++i) {
292 for (unsigned j = 0; j < matrix.size2(); ++j) {
293 result += matrix(i, j);
294 }
295 }
296 return result;
297}
298
299/// maximum
300double maximum(const Matrix& matrix) {

Callers 4

meanFunction · 0.70
TEST_FFunction · 0.50
TEST_FFunction · 0.50
TEST_FFunction · 0.50

Calls

no outgoing calls

Tested by 3

TEST_FFunction · 0.40
TEST_FFunction · 0.40
TEST_FFunction · 0.40