diff options
Diffstat (limited to 'examples/tests.hs')
-rw-r--r-- | examples/tests.hs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/examples/tests.hs b/examples/tests.hs index 047794c..b075704 100644 --- a/examples/tests.hs +++ b/examples/tests.hs | |||
@@ -159,10 +159,10 @@ addV v1 v2 = fromList $ zipWith (+) (toList v1) (toList v2) | |||
159 | 159 | ||
160 | type BaseType = Double | 160 | type BaseType = Double |
161 | 161 | ||
162 | svdTestR prod m = u <> s <> trans v |~| m | 162 | svdTestR fun prod m = u <> s <> trans v |~| m |
163 | && u <> trans u |~| ident (rows m) | 163 | && u <> trans u |~| ident (rows m) |
164 | && v <> trans v |~| ident (cols m) | 164 | && v <> trans v |~| ident (cols m) |
165 | where (u,s,v) = svdR m | 165 | where (u,s,v) = fun m |
166 | (<>) = prod | 166 | (<>) = prod |
167 | 167 | ||
168 | 168 | ||
@@ -243,8 +243,10 @@ main = do | |||
243 | quickCheck $ \(PairM m1 m2) -> mulC m1 m2 |=| trans (mulF (trans m2) (trans m1 :: Matrix BaseType)) | 243 | quickCheck $ \(PairM m1 m2) -> mulC m1 m2 |=| trans (mulF (trans m2) (trans m1 :: Matrix BaseType)) |
244 | quickCheck $ \(PairM m1 m2) -> mulC m1 m2 |=| multiplyG m1 (m2 :: Matrix BaseType) | 244 | quickCheck $ \(PairM m1 m2) -> mulC m1 m2 |=| multiplyG m1 (m2 :: Matrix BaseType) |
245 | putStrLn "--------- SVD ---------" | 245 | putStrLn "--------- SVD ---------" |
246 | quickCheck (svdTestR mulC) | 246 | quickCheck (svdTestR svdR mulC) |
247 | quickCheck (svdTestR mulF) | 247 | quickCheck (svdTestR svdR mulF) |
248 | quickCheck (svdTestR svdRdd mulC) | ||
249 | quickCheck (svdTestR svdRdd mulF) | ||
248 | quickCheck (svdTestC mulC) | 250 | quickCheck (svdTestC mulC) |
249 | quickCheck (svdTestC mulF) | 251 | quickCheck (svdTestC mulF) |
250 | putStrLn "--------- EIG ---------" | 252 | putStrLn "--------- EIG ---------" |