Created attachment 766 [details]
matrixQ extraction with SparseQR (working) and SPQR
The method I've used with SparseQR to extract the Q matrix - multiplying on the right by a dense identity matrix - does not work with SPQR, producing instead a compile error within Cholmod that looks like a trait extraction issue of some sort:
Eigen/src/CholmodSupport/CholmodSupport.h:143:47: error: third operand to the conditional operator is of type ‘void’, but the second operand is neither a throw-expression nor of type ‘void’
res.d = Derived::IsVectorAtCompileTime ? mat.derived().size() : mat.derived()
Eigen/src/CholmodSupport/CholmodSupport.h:144:14: error: ‘class Eigen::CwiseNullaryOp<Eigen::internal::scalar_identity_op<double>, Eigen::Matrix<double, -1, -1> >’ has no member named ‘data’
res.x = (void*)(mat.derived().data());
A reduced test case is attached.
You can workaround with:
MatrixXd I = MatrixXd::Identity(mat.rows(), mat.cols());
MatrixXd Q_ss = QR_ss.matrixQ() * I;
-- 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/1377.