In previous versions (including v3.2) inverses of zero-sized matrices were supported. The following code, for example, would compile and execute without issue in v3.2:
Eigen::MatrixXd a;// NOTE: using Eigen::Matrix<double, 0, 0> fails with compile-time error on the last line below
Eigen::Matrix<double, 0, 1> b;
std::cout << a.inverse() * b << std::endl;
In v3.3, this code generates the following runtime error:
Assertion failed: this->rows()>0 && this->cols()>0 && "you are using an empty matrix", file c:\lib\eigen\eigen\src\core\redux.h, line 413
It appears that the file eigen/Eigen/src/Core/Redux.h has many assertions with this "you are using an empty matrix" explanation which are not there in v3.2.
Because this was supported in v3.2 and there are good reasons to continue to support such code, I believe this behavior is a bug.
I don't think this comes from redux, but rather from this line of code in PartialPivLU to compute L1 norm:
m_l1_norm = m_lu.cwiseAbs().colwise().sum().maxCoeff();
max/min reductions are disallowed on empty matrices. So the fix is simply to check for empty-ness here. Need to add a unit test though.
-- GitLab Migration Automatic Message --
This bug has been migrated to gitlab.com's GitLab instance and has been closed from further activity.
You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.com/libeigen/eigen/issues/1669.