mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-13 20:26:03 +08:00
fix compilation of ei_tridiagonalization_inplace_selector for 1x1 matrix
This commit is contained in:
parent
2a820d41df
commit
ea27678153
@ -291,8 +291,8 @@ void ComplexEigenSolver<MatrixType>::doComputeEigenvectors(RealScalar matrixnorm
|
|||||||
ComplexScalar z = m_schur.matrixT().coeff(i,i) - m_schur.matrixT().coeff(k,k);
|
ComplexScalar z = m_schur.matrixT().coeff(i,i) - m_schur.matrixT().coeff(k,k);
|
||||||
if(z==ComplexScalar(0))
|
if(z==ComplexScalar(0))
|
||||||
{
|
{
|
||||||
// If the i-th and k-th eigenvalue are equal, then z equals 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.
|
// Use a small value instead, to prevent division by zero.
|
||||||
ei_real_ref(z) = NumTraits<RealScalar>::epsilon() * matrixnorm;
|
ei_real_ref(z) = NumTraits<RealScalar>::epsilon() * matrixnorm;
|
||||||
}
|
}
|
||||||
m_matX.coeffRef(i,k) = m_matX.coeff(i,k) / z;
|
m_matX.coeffRef(i,k) = m_matX.coeff(i,k) / z;
|
||||||
|
@ -507,8 +507,8 @@ struct ei_tridiagonalization_inplace_selector<MatrixType,3,false>
|
|||||||
/** \internal
|
/** \internal
|
||||||
* Trivial specialization for 1x1 matrices
|
* Trivial specialization for 1x1 matrices
|
||||||
*/
|
*/
|
||||||
template<typename MatrixType>
|
template<typename MatrixType, bool IsComplex>
|
||||||
struct ei_tridiagonalization_inplace_selector<MatrixType,1>
|
struct ei_tridiagonalization_inplace_selector<MatrixType,1,IsComplex>
|
||||||
{
|
{
|
||||||
typedef typename MatrixType::Scalar Scalar;
|
typedef typename MatrixType::Scalar Scalar;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user