Extracting Q matrix from SPQR produces compile error
Submitted by Jeff Trull
Assigned to Nobody
Link to original bugzilla bug (#1377)
Version: 3.3 (current stable)
Description
Created attachment 766
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.
Attachment 766, "matrixQ extraction with SparseQR (working) and SPQR":
so_spqr_testcase.cpp