diff options
Diffstat (limited to 'lib/Numeric/LinearAlgebra/Tests.hs')
-rw-r--r-- | lib/Numeric/LinearAlgebra/Tests.hs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Numeric/LinearAlgebra/Tests.hs b/lib/Numeric/LinearAlgebra/Tests.hs index 32cd39d..2b5869d 100644 --- a/lib/Numeric/LinearAlgebra/Tests.hs +++ b/lib/Numeric/LinearAlgebra/Tests.hs | |||
@@ -232,9 +232,10 @@ offsetTest = y == y' where | |||
232 | normsVTest = TestList [ | 232 | normsVTest = TestList [ |
233 | utest "normv2CD" $ norm2PropC v | 233 | utest "normv2CD" $ norm2PropC v |
234 | , utest "normv2CF" $ norm2PropC (single v) | 234 | , utest "normv2CF" $ norm2PropC (single v) |
235 | #ifndef NONORMVTEST | ||
235 | , utest "normv2D" $ norm2PropR x | 236 | , utest "normv2D" $ norm2PropR x |
236 | , utest "normv2F" $ norm2PropR (single x) | 237 | , utest "normv2F" $ norm2PropR (single x) |
237 | 238 | #endif | |
238 | , utest "normv1CD" $ norm1 v == 8 | 239 | , utest "normv1CD" $ norm1 v == 8 |
239 | , utest "normv1CF" $ norm1 (single v) == 8 | 240 | , utest "normv1CF" $ norm1 (single v) == 8 |
240 | , utest "normv1D" $ norm1 x == 6 | 241 | , utest "normv1D" $ norm1 x == 6 |
@@ -247,7 +248,9 @@ normsVTest = TestList [ | |||
247 | 248 | ||
248 | ] where v = fromList [1,-2,3:+4] :: Vector (Complex Double) | 249 | ] where v = fromList [1,-2,3:+4] :: Vector (Complex Double) |
249 | x = fromList [1,2,-3] :: Vector Double | 250 | x = fromList [1,2,-3] :: Vector Double |
251 | #ifndef NONORMVTEST | ||
250 | norm2PropR a = norm2 a =~= sqrt (dot a a) | 252 | norm2PropR a = norm2 a =~= sqrt (dot a a) |
253 | #endif | ||
251 | norm2PropC a = norm2 a =~= realPart (sqrt (dot a (conj a))) | 254 | norm2PropC a = norm2 a =~= realPart (sqrt (dot a (conj a))) |
252 | a =~= b = fromList [a] |~| fromList [b] | 255 | a =~= b = fromList [a] |~| fromList [b] |
253 | 256 | ||