[eigen] Error: trying to recover Q matrix in sparse QR factorization

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


Hello,

I have a question regarding the sparse QR implementation in the latest development build of Eigen.  

I would like to recover the Q matrix after the factorization, but can't quite do so.  I have followed the suggestion in the following link to get the SparseMatrix representation of Q (where I assume A is the original matrix that we are taking the factorization of): http://eigen.tuxfamily.org/dox-devel/classEigen_1_1SparseQR.html#ac27067ab301641fe6cc35c216a9b18a2

However, I get the following compilation error:

error: conversion from 'Eigen::SparseQRMatrixQReturnType<Eigen::SparseQR<Eigen::SparseMatrix<double>, Eigen::COLAMDOrdering<int> > >' to non-scalar type 'Eigen::SparseMatrix<double>' requested

The following is the relevant code snippet.  Let's say I have a "SparseMatrix<double> left" defined beforehand. 

typedef SparseQR<SparseMatrix<double>, COLAMDOrdering<int> > sparseqr;
sparseqr qr_factorizer;
qr_factorizer.analyzePattern(left);
qr_factorizer.factorize(left);
SparseMatrix<double> q_l = sparseqr(left).matrixQ();

Any assistance on this would be appreciated.

Avneesh



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/