summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAlberto Ruiz <aruiz@um.es>2010-03-30 07:12:50 +0000
committerAlberto Ruiz <aruiz@um.es>2010-03-30 07:12:50 +0000
commit80f6ea4a8b1c5fb0bcd68f8d934364fd9c9b4780 (patch)
tree325d2bf75618cf56edc68170f3da99f423fdc53c /lib
parentbc5cb922434daef2e4e1dd910479d2c4af37b44c (diff)
flag -f-dd
Diffstat (limited to 'lib')
-rw-r--r--lib/Numeric/LinearAlgebra/Algorithms.hs4
-rw-r--r--lib/Numeric/LinearAlgebra/Tests.hs4
-rw-r--r--lib/Numeric/LinearAlgebra/Tests/Properties.hs5
3 files changed, 12 insertions, 1 deletions
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
129 multiply' = multiplyR 129 multiply' = multiplyR
130 130
131instance Field (Complex Double) where 131instance Field (Complex Double) where
132#ifdef NOZGESDD
133 svd' = svdC
134#else
132 svd' = svdCd 135 svd' = svdCd
136#endif
133 thinSVD' = thinSVDCd 137 thinSVD' = thinSVDCd
134 sv' = svC 138 sv' = svC
135 luPacked' = luC 139 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
229 test (svdProp1a svdC) 229 test (svdProp1a svdC)
230 test (svdProp1a svdRd) 230 test (svdProp1a svdRd)
231 test (svdProp1a svdCd) 231 test (svdProp1a svdCd)
232 test (svdProp1b svdR)
233 test (svdProp1b svdC)
234 test (svdProp1b svdRd)
235 test (svdProp1b svdCd)
232 test (svdProp2 thinSVDR) 236 test (svdProp2 thinSVDR)
233 test (svdProp2 thinSVDC) 237 test (svdProp2 thinSVDC)
234 test (svdProp2 thinSVDRd) 238 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 (
29 pinvProp, 29 pinvProp,
30 detProp, 30 detProp,
31 nullspaceProp, 31 nullspaceProp,
32 svdProp1, svdProp1a, svdProp2, svdProp3, svdProp4, 32 svdProp1, svdProp1a, svdProp1b, svdProp2, svdProp3, svdProp4,
33 svdProp5a, svdProp5b, svdProp6a, svdProp6b, svdProp7, 33 svdProp5a, svdProp5b, svdProp6a, svdProp6b, svdProp7,
34 eigProp, eigSHProp, eigProp2, eigSHProp2, 34 eigProp, eigSHProp, eigProp2, eigSHProp2,
35 qrProp, rqProp, 35 qrProp, rqProp,
@@ -137,6 +137,9 @@ svdProp1a svdfun m = m |~| u <> real d <> trans v && unitary u && unitary v wher
137 (u,s,v) = svdfun m 137 (u,s,v) = svdfun m
138 d = diagRect s (rows m) (cols m) 138 d = diagRect s (rows m) (cols m)
139 139
140svdProp1b svdfun m = unitary u && unitary v where
141 (u,_,v) = svdfun m
142
140-- thinSVD 143-- thinSVD
141svdProp2 thinSVDfun m = m |~| u <> diag (real s) <> trans v && orthonormal u && orthonormal v && dim s == min (rows m) (cols m) 144svdProp2 thinSVDfun m = m |~| u <> diag (real s) <> trans v && orthonormal u && orthonormal v && dim s == min (rows m) (cols m)
142 where (u,s,v) = thinSVDfun m 145 where (u,s,v) = thinSVDfun m