#pragma once #include "./utils/vector.h" #include "./utils/matrix.h" namespace numerics{ template void inplace_matlog(utils::Matrix& A){ const uint64_t rows = A.rows(); const uint64_t cols = A.cols(); for (uint64_t i = 0; i < rows; ++i){ for (uint64_t j = 0; j < cols; ++j){ numerics::inplace_log(A(i,j)); } } } template utils::Matrix log(const utils::Matrix& A){ utils::Matrix B = A; inplace_matlog(B); return B; } } // namespace numerics