diff options
author | Dominic Steinitz <dominic@steinitz.org> | 2018-04-01 18:08:08 +0100 |
---|---|---|
committer | Dominic Steinitz <dominic@steinitz.org> | 2018-04-01 18:08:08 +0100 |
commit | 41126759c32cdf3ee20ef9e79df31905893656e0 (patch) | |
tree | 596415725485e9405c8d0e1be20fa6680981ed4f | |
parent | 1a68793247b8845cefad4d157e4f4d25b1731b42 (diff) | |
parent | c8c6a3e414bb08e3f818f58c121ddc99396b4f1e (diff) |
Merge branch 'luntain-master'
-rw-r--r-- | packages/tests/src/Numeric/LinearAlgebra/Tests.hs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/packages/tests/src/Numeric/LinearAlgebra/Tests.hs b/packages/tests/src/Numeric/LinearAlgebra/Tests.hs index 2c98c5a..960c777 100644 --- a/packages/tests/src/Numeric/LinearAlgebra/Tests.hs +++ b/packages/tests/src/Numeric/LinearAlgebra/Tests.hs | |||
@@ -617,7 +617,7 @@ _sliceTest = utest "slice test" $ and | |||
617 | 617 | ||
618 | test_qrgr n t x = qrgr n (QR x t) | 618 | test_qrgr n t x = qrgr n (QR x t) |
619 | 619 | ||
620 | ok_qrgr x = simeq 1E-15 q q' | 620 | ok_qrgr x = TestCase . assertBool "ok_qrgr" $ simeq 1E-15 q q' |
621 | where | 621 | where |
622 | (q,_) = qr x | 622 | (q,_) = qr x |
623 | atau = qrRaw x | 623 | atau = qrRaw x |
@@ -646,7 +646,8 @@ _sliceTest = utest "slice test" $ and | |||
646 | rec :: Numeric t => Matrix t | 646 | rec :: Numeric t => Matrix t |
647 | rec = subMatrix (0,0) (4,5) (gen 5) | 647 | rec = subMatrix (0,0) (4,5) (gen 5) |
648 | 648 | ||
649 | testSlice f x@(size->sz@(r,c)) = all (==f x) (map f (g y1 ++ g y2)) | 649 | testSlice f x@(size->sz@(r,c)) = |
650 | TestList . map (TestCase . assertEqual "" (f x)) $ (map f (g y1 ++ g y2)) | ||
650 | where | 651 | where |
651 | subm = subMatrix | 652 | subm = subMatrix |
652 | g y = [ subm (a*r,b*c) sz y | a <-[0..2], b <- [0..2]] | 653 | g y = [ subm (a*r,b*c) sz y | a <-[0..2], b <- [0..2]] |