From 869394ee8b0faa11f03412a77035fbf6c5c66f95 Mon Sep 17 00:00:00 2001 From: Benoit Jacob Date: Fri, 6 Jun 2008 13:10:00 +0000 Subject: fix some compile errors with gcc 4.3, some warnings, some documentation --- Eigen/src/QR/SelfAdjointEigenSolver.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'Eigen/src/QR/SelfAdjointEigenSolver.h') diff --git a/Eigen/src/QR/SelfAdjointEigenSolver.h b/Eigen/src/QR/SelfAdjointEigenSolver.h index 227d71528..fd73714dc 100644 --- a/Eigen/src/QR/SelfAdjointEigenSolver.h +++ b/Eigen/src/QR/SelfAdjointEigenSolver.h @@ -47,7 +47,7 @@ template class SelfAdjointEigenSolver typedef std::complex Complex; typedef Matrix RealVectorType; typedef Matrix RealVectorTypeX; - typedef Tridiagonalization Tridiagonalization; + typedef Tridiagonalization TridiagonalizationType; SelfAdjointEigenSolver(const MatrixType& matrix, bool computeEigenvectors = true) : m_eivec(matrix.rows(), matrix.cols()), @@ -124,8 +124,8 @@ void SelfAdjointEigenSolver::compute(const MatrixType& matrix, bool // the latter avoids multiple memory allocation when the same SelfAdjointEigenSolver is used multiple times... // (same for diag and subdiag) RealVectorType& diag = m_eivalues; - typename Tridiagonalization::SubDiagonalType subdiag(n-1); - Tridiagonalization::decomposeInPlace(m_eivec, diag, subdiag, computeEigenvectors); + typename TridiagonalizationType::SubDiagonalType subdiag(n-1); + TridiagonalizationType::decomposeInPlace(m_eivec, diag, subdiag, computeEigenvectors); int end = n-1; int start = 0; @@ -191,10 +191,11 @@ template struct ei_matrixNorm_selector static inline typename NumTraits::Scalar>::Real matrixNorm(const MatrixBase& m) { + typename Derived::Eval m_eval(m); // 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 ei_sqrt( - (m*m.adjoint()) + (m_eval*m_eval.adjoint()) .template marked() .eigenvalues() .maxCoeff() -- cgit v1.2.3