Fix SelfAdjointEigenSolver for some input expression types, and add new regression unit tests for sparse and selfadjointview inputs.

This commit is contained in:
Gael Guennebaud
2016-05-19 13:07:33 +02:00
parent 6a2916df80
commit df9a5e13c6
2 changed files with 28 additions and 3 deletions

View File

@@ -414,7 +414,7 @@ SelfAdjointEigenSolver<MatrixType>& SelfAdjointEigenSolver<MatrixType>
if(n==1)
{
m_eivalues.coeffRef(0,0) = numext::real(matrix.coeff(0,0));
m_eivalues.coeffRef(0,0) = numext::real(matrix.diagonal()[0]);
if(computeEigenvectors)
m_eivec.setOnes(n,n);
m_info = Success;