From 80f6ea4a8b1c5fb0bcd68f8d934364fd9c9b4780 Mon Sep 17 00:00:00 2001 From: Alberto Ruiz Date: Tue, 30 Mar 2010 07:12:50 +0000 Subject: flag -f-dd --- lib/Numeric/LinearAlgebra/Algorithms.hs | 4 ++++ lib/Numeric/LinearAlgebra/Tests.hs | 4 ++++ lib/Numeric/LinearAlgebra/Tests/Properties.hs | 5 ++++- 3 files changed, 12 insertions(+), 1 deletion(-) (limited to 'lib/Numeric') diff --git a/lib/Numeric/LinearAlgebra/Algorithms.hs b/lib/Numeric/LinearAlgebra/Algorithms.hs index 0f2ccef..d0f533b 100644 --- a/lib/Numeric/LinearAlgebra/Algorithms.hs +++ b/lib/Numeric/LinearAlgebra/Algorithms.hs @@ -129,7 +129,11 @@ instance Field Double where multiply' = multiplyR instance Field (Complex Double) where +#ifdef NOZGESDD + svd' = svdC +#else svd' = svdCd +#endif thinSVD' = thinSVDCd sv' = svC luPacked' = luC diff --git a/lib/Numeric/LinearAlgebra/Tests.hs b/lib/Numeric/LinearAlgebra/Tests.hs index 922bfd5..4910b67 100644 --- a/lib/Numeric/LinearAlgebra/Tests.hs +++ b/lib/Numeric/LinearAlgebra/Tests.hs @@ -229,6 +229,10 @@ runTests n = do test (svdProp1a svdC) test (svdProp1a svdRd) test (svdProp1a svdCd) + test (svdProp1b svdR) + test (svdProp1b svdC) + test (svdProp1b svdRd) + test (svdProp1b svdCd) test (svdProp2 thinSVDR) test (svdProp2 thinSVDC) test (svdProp2 thinSVDRd) diff --git a/lib/Numeric/LinearAlgebra/Tests/Properties.hs b/lib/Numeric/LinearAlgebra/Tests/Properties.hs index 6d176fa..618094b 100644 --- a/lib/Numeric/LinearAlgebra/Tests/Properties.hs +++ b/lib/Numeric/LinearAlgebra/Tests/Properties.hs @@ -29,7 +29,7 @@ module Numeric.LinearAlgebra.Tests.Properties ( pinvProp, detProp, nullspaceProp, - svdProp1, svdProp1a, svdProp2, svdProp3, svdProp4, + svdProp1, svdProp1a, svdProp1b, svdProp2, svdProp3, svdProp4, svdProp5a, svdProp5b, svdProp6a, svdProp6b, svdProp7, eigProp, eigSHProp, eigProp2, eigSHProp2, qrProp, rqProp, @@ -137,6 +137,9 @@ svdProp1a svdfun m = m |~| u <> real d <> trans v && unitary u && unitary v wher (u,s,v) = svdfun m d = diagRect s (rows m) (cols m) +svdProp1b svdfun m = unitary u && unitary v where + (u,_,v) = svdfun m + -- thinSVD svdProp2 thinSVDfun m = m |~| u <> diag (real s) <> trans v && orthonormal u && orthonormal v && dim s == min (rows m) (cols m) where (u,s,v) = thinSVDfun m -- cgit v1.2.3