mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-13 04:09:10 +08:00
bugfix in the eigenvalue solvers (forgot to resize the eigen vectors)
This commit is contained in:
parent
4b04a9bcfa
commit
d7a2a37a4c
@ -92,6 +92,7 @@ void ComplexEigenSolver<MatrixType>::compute(const MatrixType& matrix)
|
|||||||
assert(matrix.cols() == matrix.rows());
|
assert(matrix.cols() == matrix.rows());
|
||||||
int n = matrix.cols();
|
int n = matrix.cols();
|
||||||
m_eivalues.resize(n,1);
|
m_eivalues.resize(n,1);
|
||||||
|
m_eivec.resize(n,n);
|
||||||
|
|
||||||
RealScalar eps = epsilon<RealScalar>();
|
RealScalar eps = epsilon<RealScalar>();
|
||||||
|
|
||||||
|
@ -194,6 +194,7 @@ EigenSolver<MatrixType>& EigenSolver<MatrixType>::compute(const MatrixType& matr
|
|||||||
assert(matrix.cols() == matrix.rows());
|
assert(matrix.cols() == matrix.rows());
|
||||||
int n = matrix.cols();
|
int n = matrix.cols();
|
||||||
m_eivalues.resize(n,1);
|
m_eivalues.resize(n,1);
|
||||||
|
m_eivec.resize(n,n);
|
||||||
|
|
||||||
MatrixType matH = matrix;
|
MatrixType matH = matrix;
|
||||||
RealVectorType ort(n);
|
RealVectorType ort(n);
|
||||||
|
@ -168,6 +168,7 @@ SelfAdjointEigenSolver<MatrixType>& SelfAdjointEigenSolver<MatrixType>::compute(
|
|||||||
assert(matrix.cols() == matrix.rows());
|
assert(matrix.cols() == matrix.rows());
|
||||||
int n = matrix.cols();
|
int n = matrix.cols();
|
||||||
m_eivalues.resize(n,1);
|
m_eivalues.resize(n,1);
|
||||||
|
m_eivec.resize(n,n);
|
||||||
|
|
||||||
if(n==1)
|
if(n==1)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user