fix bug #128 : tridiagonalization failed for 1x1 matrices

This commit is contained in:
Gael Guennebaud 2010-12-09 19:56:20 +01:00
parent 17de59278b
commit bacd531862

View File

@ -356,12 +356,13 @@ namespace internal {
template<typename MatrixType, typename CoeffVectorType>
void tridiagonalization_inplace(MatrixType& matA, CoeffVectorType& hCoeffs)
{
eigen_assert(matA.rows()==matA.cols());
eigen_assert(matA.rows()==hCoeffs.size()+1);
typedef typename MatrixType::Index Index;
typedef typename MatrixType::Scalar Scalar;
typedef typename MatrixType::RealScalar RealScalar;
Index n = matA.rows();
eigen_assert(n==matA.cols());
eigen_assert(n==hCoeffs.size()+1 || n==1);
for (Index i = 0; i<n-1; ++i)
{
Index remainingSize = n-i-1;