mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-07-13 16:41:50 +08:00
fix a compilation issue in non debug mode
This commit is contained in:
parent
869394ee8b
commit
8769bfd9aa
@ -58,7 +58,13 @@ template<typename _MatrixType> class SelfAdjointEigenSolver
|
|||||||
|
|
||||||
void compute(const MatrixType& matrix, bool computeEigenvectors = true);
|
void compute(const MatrixType& matrix, bool computeEigenvectors = true);
|
||||||
|
|
||||||
MatrixType eigenvectors(void) const { ei_assert(m_eigenvectorsOk); return m_eivec; }
|
MatrixType eigenvectors(void) const
|
||||||
|
{
|
||||||
|
#ifndef NDEBUG
|
||||||
|
ei_assert(m_eigenvectorsOk);
|
||||||
|
#endif
|
||||||
|
return m_eivec;
|
||||||
|
}
|
||||||
|
|
||||||
RealVectorType eigenvalues(void) const { return m_eivalues; }
|
RealVectorType eigenvalues(void) const { return m_eivalues; }
|
||||||
|
|
||||||
@ -114,7 +120,9 @@ static void ei_tridiagonal_qr_step(RealScalar* diag, RealScalar* subdiag, int st
|
|||||||
template<typename MatrixType>
|
template<typename MatrixType>
|
||||||
void SelfAdjointEigenSolver<MatrixType>::compute(const MatrixType& matrix, bool computeEigenvectors)
|
void SelfAdjointEigenSolver<MatrixType>::compute(const MatrixType& matrix, bool computeEigenvectors)
|
||||||
{
|
{
|
||||||
|
#ifndef NDEBUG
|
||||||
m_eigenvectorsOk = computeEigenvectors;
|
m_eigenvectorsOk = computeEigenvectors;
|
||||||
|
#endif
|
||||||
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);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user