The following: Eigen::SelfAdjointEigenSolver<Eigen::MatrixXd> solver; solver.compute(covariance.selfadjointView<Eigen::Upper>()); used to compile with 3.2 but fails on the dev branch (synced at commit 6203649a0399) with: In file included from XXX/utils.cc:11: In file included from YYY/Eigen/Eigenvalues:38: YYY/Eigen/src/Eigenvalues/SelfAdjointEigenSolver.h:431:25: error: no member named 'triangularView' in 'Eigen::SelfAdjointView<Eigen::Matrix<double, -1, -1, 0, -1, -1>, 2>' mat = matrix.template triangularView<Lower>(); ~~~~~~ ^ XXX/utils.cc:54:10: note: in instantiation of function template specialization 'Eigen::SelfAdjointEigenSolver<Eigen::Matrix<double, -1, -1, 0, -1, -1> >::compute<Eigen::SelfAdjointView<Eigen::Matrix<double, -1, -1, 0, -1, -1>, 2> >' requested here solver.compute(covariance.selfadjointView<Eigen::Upper>()); Workaround: covariance = covariance.selfadjointView<Eigen::Upper>(); Eigen::SelfAdjointEigenSolver<Eigen::MatrixXd> solver; solver.compute(covariance);
Actually, this is not really a bug, is it? Or at least, the usefulness of being able to pass in SelfAdjointView<Upper> is questionable. The code in question could just pass in a lower triangular matrix instead (in fact it makes the code simpler and faster). I'll let you decide whether to close this or not.
Actually we could easily support SelfadjointView::triangularView, could be convenient in many other situation. In your case, since SelfAdjointEigenSolver is expected to get the lower part, you could simply pass cov.transpose(). This is how SelfadjointView<Upper>::triangularView<Lower> would be implemented.
I agree that it would be convenient. In my case the code was actually going through contortions to not create a lower-triangular matrix, so this missing feature was a good excuse to fix it :-)
-- 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/1225.