summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README4
-rw-r--r--lib/Numeric/LinearAlgebra/Tests.hs7
2 files changed, 10 insertions, 1 deletions
diff --git a/README b/README
index 3cbcab1..7b2c65a 100644
--- a/README
+++ b/README
@@ -107,3 +107,7 @@ in the Haskell mailing lists for their help.
107- Simon Beaumont reported the need of QuickCheck<2 and the invalid 107- Simon Beaumont reported the need of QuickCheck<2 and the invalid
108 asm("finit") on ppc. He also contributed the configuration options 108 asm("finit") on ppc. He also contributed the configuration options
109 for the accelerate framework on OS X. 109 for the accelerate framework on OS X.
110
111- Daniel Schüssler added compatibility with QuickCheck 2 as well
112 as QuickCheck 1 using the C preprocessor. He also added some
113 implementations for the new "shrink" method of class Arbitrary.
diff --git a/lib/Numeric/LinearAlgebra/Tests.hs b/lib/Numeric/LinearAlgebra/Tests.hs
index 8b92287..7758268 100644
--- a/lib/Numeric/LinearAlgebra/Tests.hs
+++ b/lib/Numeric/LinearAlgebra/Tests.hs
@@ -182,9 +182,10 @@ runTests n = do
182 test (\v -> ifft (fft v) |~| v) 182 test (\v -> ifft (fft v) |~| v)
183 putStrLn "------ vector operations" 183 putStrLn "------ vector operations"
184 test (\u -> sin u ^ 2 + cos u ^ 2 |~| (1::RM)) 184 test (\u -> sin u ^ 2 + cos u ^ 2 |~| (1::RM))
185 test $ (\u -> sin u ^ 2 + cos u ^ 2 |~| (1::CM)) . liftMatrix makeUnitary
185 test (\u -> sin u ** 2 + cos u ** 2 |~| (1::RM)) 186 test (\u -> sin u ** 2 + cos u ** 2 |~| (1::RM))
186 test (\u -> cos u * tan u |~| sin (u::RM)) 187 test (\u -> cos u * tan u |~| sin (u::RM))
187 test (\u -> (cos u * tan u) |~| sin (u::CM)) 188 test $ (\u -> cos u * tan u |~| sin (u::CM)) . liftMatrix makeUnitary
188 putStrLn "------ read . show" 189 putStrLn "------ read . show"
189 test (\m -> (m::RM) == read (show m)) 190 test (\m -> (m::RM) == read (show m))
190 test (\m -> (m::CM) == read (show m)) 191 test (\m -> (m::CM) == read (show m))
@@ -208,6 +209,10 @@ runTests n = do
208 ] 209 ]
209 return () 210 return ()
210 211
212makeUnitary v | realPart n > 1 = v */ n
213 | otherwise = v
214 where n = sqrt (conj v <.> v)
215
211-- -- | Some additional tests on big matrices. They take a few minutes. 216-- -- | Some additional tests on big matrices. They take a few minutes.
212-- runBigTests :: IO () 217-- runBigTests :: IO ()
213-- runBigTests = undefined 218-- runBigTests = undefined