23 lines
344 B
C++
23 lines
344 B
C++
#pragma once
|
|
|
|
#include "./utils/matrix.h"
|
|
|
|
namespace numerics{
|
|
|
|
|
|
template <typename T>
|
|
utils::Matrix<T> matexp(const utils::Matrix<T>& A){
|
|
utils::Matrix<T> B = A;
|
|
for (uint64_t i = 0; i < A.rows(); ++i){
|
|
for (uint64_t j = 0; j < A.cols(); ++j){
|
|
B(i,j) = numerics::exp(A(i,j));
|
|
}
|
|
}
|
|
return B;
|
|
}
|
|
|
|
|
|
|
|
} // namespace numerics
|
|
|