fix bug #316 - SelfAdjointEigenSolver::compute does not handle matrices of size (1,1) correctly

This commit is contained in:
Gael Guennebaud 2011-07-09 07:15:14 +02:00
parent 08074843ac
commit 5fdebc2fa5

View File

@ -387,7 +387,7 @@ SelfAdjointEigenSolver<MatrixType>& SelfAdjointEigenSolver<MatrixType>
{
m_eivalues.coeffRef(0,0) = internal::real(matrix.coeff(0,0));
if(computeEigenvectors)
m_eivec.setOnes();
m_eivec.setOnes(n,n);
m_info = Success;
m_isInitialized = true;
m_eigenvectorsOk = computeEigenvectors;