summaryrefslogtreecommitdiff
path: root/lib/Numeric/LinearAlgebra/Tests.hs
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Numeric/LinearAlgebra/Tests.hs')
-rw-r--r--lib/Numeric/LinearAlgebra/Tests.hs12
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/Numeric/LinearAlgebra/Tests.hs b/lib/Numeric/LinearAlgebra/Tests.hs
index 76eaaae..3bcfec5 100644
--- a/lib/Numeric/LinearAlgebra/Tests.hs
+++ b/lib/Numeric/LinearAlgebra/Tests.hs
@@ -380,6 +380,17 @@ condTest = utest "cond" ok
380 380
381--------------------------------------------------------------------- 381---------------------------------------------------------------------
382 382
383conformTest = utest "conform" ok
384 where
385 ok = 1 + row [1,2,3] + col [10,20,30,40] + (4><3) [1..]
386 == (4><3) [13,15,17
387 ,26,28,30
388 ,39,41,43
389 ,52,54,56]
390 row = asRow . fromList
391 col = asColumn . fromList :: [Double] -> Matrix Double
392
393---------------------------------------------------------------------
383 394
384-- | All tests must pass with a maximum dimension of about 20 395-- | All tests must pass with a maximum dimension of about 20
385-- (some tests may fail with bigger sizes due to precision loss). 396-- (some tests may fail with bigger sizes due to precision loss).
@@ -550,6 +561,7 @@ runTests n = do
550 , succTest 561 , succTest
551 , findAssocTest 562 , findAssocTest
552 , condTest 563 , condTest
564 , conformTest
553 ] 565 ]
554 return () 566 return ()
555 567