The following does not compile: --------------------------- Matrix3d A; RowVector3d bT, xT; A << 1, 2, 3, 4, 5, 6, 7, 8, 9; bT << 1, 2, 3; xT = A.triangularView<Upper>().solve<OnTheRight>(bT); // WORKS FINE! printf("(%g, %g, %g)", xT(0), xT(1), xT(2)); SparseMatrix<double> spA = A.sparseView(); spA.triangularView<Upper>().solve<OnTheRight>(bT); // COMPILE ERROR! --------------------------- SparseTriangularView::solve accepts neither <OnTheLeft> nor <OnTheRight> as template argument, but neglecting the argument compiles fine..
Most likely this will not be implemented without bug 99. With bug 99, we might directly make things like xt = bT * spA.triangularView<Upper>().inverse(); do "the right thing". You can workaround using: xT=spA.transpose().triangularView<Lower>().solve(bT.transpose()).transpose(); or, if possible, model your matrices and vectors the other way around.
-- 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/835.