fix compilation of ei_tridiagonalization_inplace_selector for 1x1 matrix

This commit is contained in:
Gael Guennebaud 2010-07-18 17:10:11 +02:00
parent 2a820d41df
commit ea27678153
2 changed files with 4 additions and 4 deletions

View File

@ -291,8 +291,8 @@ void ComplexEigenSolver<MatrixType>::doComputeEigenvectors(RealScalar matrixnorm
ComplexScalar z = m_schur.matrixT().coeff(i,i) - m_schur.matrixT().coeff(k,k);
if(z==ComplexScalar(0))
{
// If the i-th and k-th eigenvalue are equal, then z equals 0.
// Use a small value instead, to prevent division by zero.
// If the i-th and k-th eigenvalue are equal, then z equals 0.
// Use a small value instead, to prevent division by zero.
ei_real_ref(z) = NumTraits<RealScalar>::epsilon() * matrixnorm;
}
m_matX.coeffRef(i,k) = m_matX.coeff(i,k) / z;

View File

@ -507,8 +507,8 @@ struct ei_tridiagonalization_inplace_selector<MatrixType,3,false>
/** \internal
* Trivial specialization for 1x1 matrices
*/
template<typename MatrixType>
struct ei_tridiagonalization_inplace_selector<MatrixType,1>
template<typename MatrixType, bool IsComplex>
struct ei_tridiagonalization_inplace_selector<MatrixType,1,IsComplex>
{
typedef typename MatrixType::Scalar Scalar;