add a reconstruction test

This commit is contained in:
Gael Guennebaud 2011-12-23 23:15:08 +01:00
parent 8171adb7ff
commit 96a18ef230

View File

@ -132,6 +132,11 @@ void jacobisvd_test_all_computation_options(const MatrixType& m)
jacobisvd_solve<MatrixType, QRPreconditioner>(m, ComputeThinU | ComputeFullV);
jacobisvd_solve<MatrixType, QRPreconditioner>(m, ComputeThinU | ComputeThinV);
}
{
JacobiSVD<MatrixType, QRPreconditioner> svd(m, ComputeThinU | ComputeThinV);
VERIFY_IS_APPROX(m, svd.matrixU() * svd.singularValues().asDiagonal() * svd.matrixV().transpose());
}
}
template<typename MatrixType>