mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Fix several uninitialized member from ctor
This commit is contained in:
@@ -110,7 +110,7 @@ template<typename _MatrixType> class EigenSolver
|
||||
*
|
||||
* \sa compute() for an example.
|
||||
*/
|
||||
EigenSolver() : m_eivec(), m_eivalues(), m_isInitialized(false), m_realSchur(), m_matT(), m_tmp() {}
|
||||
EigenSolver() : m_eivec(), m_eivalues(), m_isInitialized(false), m_eigenvectorsOk(false), m_realSchur(), m_matT(), m_tmp() {}
|
||||
|
||||
/** \brief Default constructor with memory preallocation
|
||||
*
|
||||
|
||||
@@ -90,8 +90,9 @@ namespace Eigen {
|
||||
m_Z(size, size),
|
||||
m_workspace(size*2),
|
||||
m_maxIters(400),
|
||||
m_isInitialized(false)
|
||||
{ }
|
||||
m_isInitialized(false),
|
||||
m_computeQZ(true)
|
||||
{}
|
||||
|
||||
/** \brief Constructor; computes real QZ decomposition of given matrices
|
||||
*
|
||||
@@ -108,9 +109,11 @@ namespace Eigen {
|
||||
m_Z(A.rows(),A.cols()),
|
||||
m_workspace(A.rows()*2),
|
||||
m_maxIters(400),
|
||||
m_isInitialized(false) {
|
||||
compute(A, B, computeQZ);
|
||||
}
|
||||
m_isInitialized(false),
|
||||
m_computeQZ(true)
|
||||
{
|
||||
compute(A, B, computeQZ);
|
||||
}
|
||||
|
||||
/** \brief Returns matrix Q in the QZ decomposition.
|
||||
*
|
||||
|
||||
@@ -122,7 +122,8 @@ template<typename _MatrixType> class SelfAdjointEigenSolver
|
||||
m_eivalues(),
|
||||
m_subdiag(),
|
||||
m_info(InvalidInput),
|
||||
m_isInitialized(false)
|
||||
m_isInitialized(false),
|
||||
m_eigenvectorsOk(false)
|
||||
{ }
|
||||
|
||||
/** \brief Constructor, pre-allocates memory for dynamic-size matrices.
|
||||
@@ -142,7 +143,8 @@ template<typename _MatrixType> class SelfAdjointEigenSolver
|
||||
: m_eivec(size, size),
|
||||
m_eivalues(size),
|
||||
m_subdiag(size > 1 ? size - 1 : 1),
|
||||
m_isInitialized(false)
|
||||
m_isInitialized(false),
|
||||
m_eigenvectorsOk(false)
|
||||
{}
|
||||
|
||||
/** \brief Constructor; computes eigendecomposition of given matrix.
|
||||
@@ -166,7 +168,8 @@ template<typename _MatrixType> class SelfAdjointEigenSolver
|
||||
: m_eivec(matrix.rows(), matrix.cols()),
|
||||
m_eivalues(matrix.cols()),
|
||||
m_subdiag(matrix.rows() > 1 ? matrix.rows() - 1 : 1),
|
||||
m_isInitialized(false)
|
||||
m_isInitialized(false),
|
||||
m_eigenvectorsOk(false)
|
||||
{
|
||||
compute(matrix.derived(), options);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user