mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
fix #75, and add a basic unit test for Hessenberg
(it was indirectly tested by the eigenvalue decomposition)
This commit is contained in:
@@ -71,9 +71,11 @@ template<typename _MatrixType> class HessenbergDecomposition
|
||||
{}
|
||||
|
||||
HessenbergDecomposition(const MatrixType& matrix)
|
||||
: m_matrix(matrix),
|
||||
m_hCoeffs(matrix.cols()-1)
|
||||
: m_matrix(matrix)
|
||||
{
|
||||
if(matrix.rows()<=2)
|
||||
return;
|
||||
m_hCoeffs.resize(matrix.rows()-1,1);
|
||||
_compute(m_matrix, m_hCoeffs);
|
||||
}
|
||||
|
||||
@@ -84,6 +86,8 @@ template<typename _MatrixType> class HessenbergDecomposition
|
||||
void compute(const MatrixType& matrix)
|
||||
{
|
||||
m_matrix = matrix;
|
||||
if(matrix.rows()<=2)
|
||||
return;
|
||||
m_hCoeffs.resize(matrix.rows()-1,1);
|
||||
_compute(m_matrix, m_hCoeffs);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user