From d7a2a37a4c1728dbddbfae9d577e2e49f5edda65 Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Wed, 30 Sep 2009 16:48:02 +0200 Subject: [PATCH] bugfix in the eigenvalue solvers (forgot to resize the eigen vectors) --- Eigen/src/Eigenvalues/ComplexEigenSolver.h | 1 + Eigen/src/Eigenvalues/EigenSolver.h | 1 + Eigen/src/Eigenvalues/SelfAdjointEigenSolver.h | 1 + 3 files changed, 3 insertions(+) diff --git a/Eigen/src/Eigenvalues/ComplexEigenSolver.h b/Eigen/src/Eigenvalues/ComplexEigenSolver.h index 666381949..224918795 100644 --- a/Eigen/src/Eigenvalues/ComplexEigenSolver.h +++ b/Eigen/src/Eigenvalues/ComplexEigenSolver.h @@ -92,6 +92,7 @@ void ComplexEigenSolver::compute(const MatrixType& matrix) assert(matrix.cols() == matrix.rows()); int n = matrix.cols(); m_eivalues.resize(n,1); + m_eivec.resize(n,n); RealScalar eps = epsilon(); diff --git a/Eigen/src/Eigenvalues/EigenSolver.h b/Eigen/src/Eigenvalues/EigenSolver.h index 3fc36c080..73d240de0 100644 --- a/Eigen/src/Eigenvalues/EigenSolver.h +++ b/Eigen/src/Eigenvalues/EigenSolver.h @@ -194,6 +194,7 @@ EigenSolver& EigenSolver::compute(const MatrixType& matr assert(matrix.cols() == matrix.rows()); int n = matrix.cols(); m_eivalues.resize(n,1); + m_eivec.resize(n,n); MatrixType matH = matrix; RealVectorType ort(n); diff --git a/Eigen/src/Eigenvalues/SelfAdjointEigenSolver.h b/Eigen/src/Eigenvalues/SelfAdjointEigenSolver.h index 84856aa66..9e155de8f 100644 --- a/Eigen/src/Eigenvalues/SelfAdjointEigenSolver.h +++ b/Eigen/src/Eigenvalues/SelfAdjointEigenSolver.h @@ -168,6 +168,7 @@ SelfAdjointEigenSolver& SelfAdjointEigenSolver::compute( assert(matrix.cols() == matrix.rows()); int n = matrix.cols(); m_eivalues.resize(n,1); + m_eivec.resize(n,n); if(n==1) {