mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Fixed some SVD issues.
Make the SVD's output unitary. Improved unit tests. Added an assert to the SVD ctor to check whether rows>=cols.
This commit is contained in:
@@ -83,11 +83,14 @@ template<typename _MatrixType> class SVD
|
||||
* \sa JacobiSVD()
|
||||
*/
|
||||
SVD(Index rows, Index cols) : m_matU(rows, rows),
|
||||
m_matV(cols,cols),
|
||||
m_sigma(std::min(rows, cols)),
|
||||
m_workMatrix(rows, cols),
|
||||
m_rv1(cols),
|
||||
m_isInitialized(false) {}
|
||||
m_matV(cols,cols),
|
||||
m_sigma(std::min(rows, cols)),
|
||||
m_workMatrix(rows, cols),
|
||||
m_rv1(cols),
|
||||
m_isInitialized(false)
|
||||
{
|
||||
ei_assert(rows >= cols && "SVD is only defined if rows>=cols.");
|
||||
}
|
||||
|
||||
SVD(const MatrixType& matrix) : m_matU(matrix.rows(), matrix.rows()),
|
||||
m_matV(matrix.cols(),matrix.cols()),
|
||||
|
||||
Reference in New Issue
Block a user