Sync public subset from Flux

This commit is contained in:
Gitea CI
2025-10-07 11:09:55 +00:00
parent 8892d58e66
commit 35023cb7e1
30 changed files with 707 additions and 229 deletions

34
include/numerics/matlog.h Normal file
View File

@@ -0,0 +1,34 @@
#pragma once
#include "./utils/vector.h"
#include "./utils/matrix.h"
namespace numerics{
template <typename T>
void inplace_matlog(utils::Matrix<T>& 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 <typename T>
utils::Matrix<T> log(const utils::Matrix<T>& A){
utils::Matrix<T> B = A;
inplace_matlog(B);
return B;
}
} // namespace numerics