From b09bb50aebdc7442dbf3d1bc21772acf3194bd4e Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Thu, 15 Jul 2010 19:52:11 +0200 Subject: [PATCH] fix QR solving with m>n --- Eigen/src/QR/QR.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Eigen/src/QR/QR.h b/Eigen/src/QR/QR.h index d96f4971a..b8161733a 100644 --- a/Eigen/src/QR/QR.h +++ b/Eigen/src/QR/QR.h @@ -270,14 +270,14 @@ bool QR::solve( ei_assert(m_isInitialized && "QR is not initialized."); const int rows = m_qr.rows(); ei_assert(b.rows() == rows); - result->resize(rows, b.cols()); + result->resize(m_qr.cols(), b.cols()); // TODO(keir): There is almost certainly a faster way to multiply by // Q^T without explicitly forming matrixQ(). Investigate. *result = matrixQ().transpose()*b; if(m_rank==0) - return result.isZero(); + return result->isZero(); if(!isSurjective()) {