- many updates after Cwise change

- fix compilation in product.cpp with std::complex
- fix bug in MatrixBase::operator!=
This commit is contained in:
Benoit Jacob
2008-07-08 07:56:01 +00:00
parent f5791eeb70
commit 6f09d3a67d
21 changed files with 40 additions and 56 deletions

View File

@@ -105,7 +105,7 @@ void EigenSolver<MatrixType>::orthes(MatrixType& matH, RealVectorType& ort)
for (int m = low+1; m <= high-1; m++)
{
// Scale column.
Scalar scale = matH.block(m, m-1, high-m+1, 1).cwiseAbs().sum();
Scalar scale = matH.block(m, m-1, high-m+1, 1).cwise().abs().sum();
if (scale != 0.0)
{
// Compute Householder transformation.
@@ -193,7 +193,7 @@ void EigenSolver<MatrixType>::hqr2(MatrixType& matH)
// Store roots isolated by balanc and compute matrix norm
// FIXME to be efficient the following would requires a triangular reduxion code
// Scalar norm = matH.upper().cwiseAbs().sum() + matH.corner(BottomLeft,n,n).diagonal().cwiseAbs().sum();
// Scalar norm = matH.upper().cwise().abs().sum() + matH.corner(BottomLeft,n,n).diagonal().cwise().abs().sum();
Scalar norm = 0.0;
for (int j = 0; j < nn; j++)
{
@@ -203,7 +203,7 @@ void EigenSolver<MatrixType>::hqr2(MatrixType& matH)
m_eivalues.coeffRef(j).real() = matH.coeff(j,j);
m_eivalues.coeffRef(j).imag() = 0.0;
}
norm += matH.col(j).start(std::min(j+1,nn)).cwiseAbs().sum();
norm += matH.col(j).start(std::min(j+1,nn)).cwise().abs().sum();
}
// Outer loop over eigenvalue index

View File

@@ -54,7 +54,7 @@ template<typename MatrixType> class QR
}
/** \returns whether or not the matrix is of full rank */
bool isFullRank() const { return ei_isMuchSmallerThan(m_hCoeffs.cwiseAbs().minCoeff(), Scalar(1)); }
bool isFullRank() const { return ei_isMuchSmallerThan(m_hCoeffs.cwise().abs().minCoeff(), Scalar(1)); }
/** \returns a read-only expression of the matrix R of the actual the QR decomposition */
const Extract<NestByValue<MatrixRBlockType>, Upper>

View File

@@ -251,7 +251,7 @@ struct ei_matrixNorm_selector
{
// FIXME if it is really guaranteed that the eigenvalues are already sorted,
// then we don't need to compute a maxCoeff() here, comparing the 1st and last ones is enough.
return m.eigenvalues().cwiseAbs().maxCoeff();
return m.eigenvalues().cwise().abs().maxCoeff();
}
};