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

Function log

src/utilities/data/Matrix.cpp:229–239  ·  view source on GitHub ↗

take the natural logarithm of a Matrix

Source from the content-addressed store, hash-verified

227
228/// take the natural logarithm of a Matrix
229Matrix log(const Matrix& v) {
230 size_t M = v.size1();
231 size_t N = v.size2();
232 Matrix result(M, N);
233 for (size_t i = 0; i < M; ++i) {
234 for (size_t j = 0; j < N; ++j) {
235 result(i, j) = std::log(v(i, j));
236 }
237 }
238 return result;
239}
240
241/// take the logarithm of a Matrix with certain base
242Matrix log(const Matrix& v, double base) {

Callers 3

TEST_FFunction · 0.50
TEST_FFunction · 0.50
psatFunction · 0.50

Calls 1

vFunction · 0.50

Tested by 2

TEST_FFunction · 0.40
TEST_FFunction · 0.40