From f5f2b222a3862d5ccc19e6e44e4f37de1a56dfb5 Mon Sep 17 00:00:00 2001 From: Gael Guennebaud Date: Sun, 16 Aug 2009 00:02:36 +0200 Subject: [PATCH] make SVD reuses applyJacobi --- Eigen/src/SVD/SVD.h | 26 +++++--------------------- 1 file changed, 5 insertions(+), 21 deletions(-) diff --git a/Eigen/src/SVD/SVD.h b/Eigen/src/SVD/SVD.h index ddc0de4ce..2948087a2 100644 --- a/Eigen/src/SVD/SVD.h +++ b/Eigen/src/SVD/SVD.h @@ -307,13 +307,7 @@ void SVD::compute(const MatrixType& matrix) h = Scalar(1.0)/h; c = g*h; s = -f*h; - for (j=0; j::compute(const MatrixType& matrix) y = W[i]; h = s*g; g = c*g; + z = pythag(f,h); rv1[j] = z; c = f/z; @@ -354,13 +349,8 @@ void SVD::compute(const MatrixType& matrix) g = g*c - x*s; h = y*s; y *= c; - for (jj=0; jj::compute(const MatrixType& matrix) } f = c*g + s*y; x = c*y - s*g; - for (jj=0; jj