OK, ideally what I would like to do is perform two QR decompositions (let's call them "left" and "right"), and take their resulting product Q_left^T * Q_right. You mentioned that I can directly use qr_factorizer.matrixQ() in expressions, but I'm unable to make it work. In code:
typedef SparseQR<SparseMatrix<double>, COLAMDOrdering<int> > sparseqr;
sparseqr qr_factorizer_left, qr_factorizer_right;
qr_factorizer_left.analyzePattern(left);
qr_factorizer_left.factorize(left);
qr_factorizer_right.analyzePattern(right);
qr_factorizer_right.factorize(right);
SparseMatrix<double> q1t_q2 = qr_factorizer_left.matrixQ().transpose()*qr_factorizer_right.matrixQ();
However, I get the following compilation error:
error: no match for 'operator*' in 'qr_factorizer_left.Eigen::SparseQR<MatrixType, OrderingType>::matrixQ [with _MatrixType = Eigen::SparseMatrix<double>, _OrderingType = Eigen::COLAMDOrdering<int>]().Eigen::SparseQRMatrixQReturnType<SparseQRType>::transpose [with SparseQRType = Eigen::SparseQR<Eigen::SparseMatrix<double>, Eigen::COLAMDOrdering<int> >]() * qr_factorizer_right.Eigen::SparseQR<MatrixType, OrderingType>::matrixQ [with _MatrixType = Eigen::SparseMatrix<double>, _OrderingType = Eigen::COLAMDOrdering<int>]()'
./Eigen/src/SparseCore/../plugins/CommonCwiseUnaryOps.h:80:1: note: candidates are: const Eigen::CwiseUnaryOp<Eigen::internal::scalar_multiple2_op<double, std::complex<double> >, const Eigen::SparseMatrix<double> > Eigen::operator*(const std::complex<double>&, const Eigen::SparseMatrixBase<Eigen::SparseMatrix<double> >::StorageBaseType&)
./Eigen/src/SparseCore/../plugins/CommonCwiseUnaryOps.h:76:1: note: const Eigen::SparseMatrixBase<Eigen::SparseMatrix<double> >::ScalarMultipleReturnType Eigen::operator*(const Eigen::SparseMatrixBase<Eigen::SparseMatrix<double, 0, int> >::Scalar&, const Eigen::SparseMatrixBase<Eigen::SparseMatrix<double> >::StorageBaseType&)
Am I missing something obvious here?
Avneesh