aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2009-07-04 09:28:11 +0200
committerGravatar Gael Guennebaud <g.gael@free.fr>2009-07-04 09:28:11 +0200
commitd457ec58108ecfdaa8a8a5cedb2600828019077e (patch)
tree31d9f95f05080075f897b6f85154f867e5cf2bef /Eigen
parent7b750182f244683d37de585b6181cf59bf24ff2b (diff)
fix #20: SVD::solve() now resize the result
Diffstat (limited to 'Eigen')
-rw-r--r--Eigen/src/SVD/SVD.h2
1 files changed, 2 insertions, 0 deletions
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<MatrixType>::solve(const MatrixBase<OtherDerived> &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<b.cols(); ++j)
{