mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Bug fix in MatrixExponential.h
Initialize matrices for intermediate results to correct dimension
This commit is contained in:
@@ -292,7 +292,10 @@ namespace MatrixExponentialInternal {
|
||||
template <typename MatrixType>
|
||||
void compute(const MatrixType &M, MatrixType* result)
|
||||
{
|
||||
MatrixType num, den, U, V;
|
||||
MatrixType num(M.rows(), M.cols());
|
||||
MatrixType den(M.rows(), M.cols());
|
||||
MatrixType U(M.rows(), M.cols());
|
||||
MatrixType V(M.rows(), M.cols());
|
||||
MatrixType Id = MatrixType::Identity(M.rows(), M.cols());
|
||||
float l1norm = static_cast<float>(M.cwise().abs().colwise().sum().maxCoeff());
|
||||
int squarings;
|
||||
|
||||
Reference in New Issue
Block a user