diff options
author | Gael Guennebaud <g.gael@free.fr> | 2011-12-23 23:15:08 +0100 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2011-12-23 23:15:08 +0100 |
commit | 96a18ef230e36d4cde6235bf5a7a41b077efc7ef (patch) | |
tree | 1990d093a78b3123c1c21a80e719c471e251c54b /test/jacobisvd.cpp | |
parent | 8171adb7ff5a550e31e0c49eeb6c7386efec0eb2 (diff) |
add a reconstruction test
Diffstat (limited to 'test/jacobisvd.cpp')
-rw-r--r-- | test/jacobisvd.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/jacobisvd.cpp b/test/jacobisvd.cpp index f44e66c94..cf8c76055 100644 --- a/test/jacobisvd.cpp +++ b/test/jacobisvd.cpp @@ -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> |