diff options
author | Gael Guennebaud <g.gael@free.fr> | 2009-07-06 13:47:41 +0200 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2009-07-06 13:47:41 +0200 |
commit | 0c2232e5d972986ed90c917b68fb24eef372841b (patch) | |
tree | 0c02c5c3ab6076f7ad1ddf815401d2c9e819d984 /test | |
parent | 0cd158820cb8acb18507158fc1e3be327cdd0213 (diff) |
quick reimplementation of SVD from the numeral recipes book:
this is still not Eigen style code but at least it works for
n>m and it is more accurate than the JAMA based version. (I needed
it now, this is why I did that)
Diffstat (limited to 'test')
-rw-r--r-- | test/svd.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/svd.cpp b/test/svd.cpp index 2eb7881a0..93e5ea017 100644 --- a/test/svd.cpp +++ b/test/svd.cpp @@ -50,7 +50,7 @@ template<typename MatrixType> void svd(const MatrixType& m) MatrixType sigma = MatrixType::Zero(rows,cols); MatrixType matU = MatrixType::Zero(rows,rows); sigma.block(0,0,cols,cols) = svd.singularValues().asDiagonal(); - matU.block(0,0,rows,cols) = svd.matrixU(); + matU = svd.matrixU(); VERIFY_IS_APPROX(a, matU * sigma * svd.matrixV().transpose()); } |