From d457ec58108ecfdaa8a8a5cedb2600828019077e Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Sat, 4 Jul 2009 09:28:11 +0200 Subject: [PATCH] fix #20: SVD::solve() now resize the result --- Eigen/src/SVD/SVD.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Eigen/src/SVD/SVD.h b/Eigen/src/SVD/SVD.h index 9733fbd21..45a7fbfa5 100644 --- a/Eigen/src/SVD/SVD.h +++ b/Eigen/src/SVD/SVD.h @@ -554,6 +554,8 @@ bool SVD::solve(const MatrixBase &b, ResultType* resul const int rows = m_matU.rows(); ei_assert(b.rows() == rows); + result->resize(m_matV.rows(), b.cols()); + Scalar maxVal = m_sigma.cwise().abs().maxCoeff(); for (int j=0; j