mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-12 19:59:05 +08:00
Add assertion against undefined matrix power.
This commit is contained in:
parent
04bd1e3fc0
commit
25544dbec3
@ -398,8 +398,11 @@ void MatrixPower<MatrixType>::initialize()
|
|||||||
}
|
}
|
||||||
|
|
||||||
m_nulls = rows() - m_rank;
|
m_nulls = rows() - m_rank;
|
||||||
if (m_nulls)
|
if (m_nulls) {
|
||||||
|
eigen_assert(m_T.bottomRightCorner(m_nulls, m_nulls).isZero()
|
||||||
|
&& "Base of matrix power should be invertible or with a semisimple zero eigenvalue.");
|
||||||
m_fT.bottomRows(m_nulls).fill(RealScalar(0));
|
m_fT.bottomRows(m_nulls).fill(RealScalar(0));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename MatrixType>
|
template<typename MatrixType>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user