From 29c6b2452dbe82cd49aa701921f2fa5a20017cc0 Mon Sep 17 00:00:00 2001 From: Benoit Jacob Date: Mon, 31 Aug 2009 22:09:44 -0400 Subject: [PATCH] simplifications --- test/svd.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/test/svd.cpp b/test/svd.cpp index 2ccd94764..e6a32bd3f 100644 --- a/test/svd.cpp +++ b/test/svd.cpp @@ -41,15 +41,11 @@ template void svd(const MatrixType& m) Matrix::Random(rows,1); Matrix x(cols,1), x2(cols,1); - RealScalar largerEps = test_precision(); - if (ei_is_same_type::ret) - largerEps = 1e-3f; - { SVD svd(a); MatrixType sigma = MatrixType::Zero(rows,cols); MatrixType matU = MatrixType::Zero(rows,rows); - sigma.block(0,0,cols,cols) = svd.singularValues().asDiagonal(); + sigma.diagonal() = svd.singularValues(); matU = svd.matrixU(); VERIFY_IS_APPROX(a, matU * sigma * svd.matrixV().transpose()); }