mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-07-21 20:34:28 +08:00
add assert for M>=N
This commit is contained in:
parent
09364c8d05
commit
5e24fbbead
@ -107,6 +107,7 @@ void SVD<MatrixType>::compute(const MatrixType& matrix)
|
|||||||
const int m = matrix.rows();
|
const int m = matrix.rows();
|
||||||
const int n = matrix.cols();
|
const int n = matrix.cols();
|
||||||
const int nu = std::min(m,n);
|
const int nu = std::min(m,n);
|
||||||
|
ei_assert(m>=n && "In Eigen 2.0, SVD only works for MxN matrices with M>=N. Sorry!");
|
||||||
|
|
||||||
m_matU.resize(m, nu);
|
m_matU.resize(m, nu);
|
||||||
m_matU.setZero();
|
m_matU.setZero();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user