From 887622a8e23d862160489c7f8912c85e86d5d911 Mon Sep 17 00:00:00 2001 From: Alberto Ruiz Date: Wed, 20 Jan 2010 14:17:49 +0000 Subject: block utest --- lib/Data/Packed/Matrix.hs | 2 ++ lib/Numeric/LinearAlgebra/Tests.hs | 1 + 2 files changed, 3 insertions(+) (limited to 'lib') diff --git a/lib/Data/Packed/Matrix.hs b/lib/Data/Packed/Matrix.hs index 912e1c6..4cb7a88 100644 --- a/lib/Data/Packed/Matrix.hs +++ b/lib/Data/Packed/Matrix.hs @@ -60,7 +60,9 @@ corresponding common row and column: \> let vector xs = fromList xs :: Vector Double \> let diagl = diag . vector \> let rowm = asRow . vector + \> disp $ fromBlocks [[ident 5, 7, rowm[10,20]], [3, diagl[1,2,3], 0]] + 8x10 1 0 0 0 0 7 7 7 10 20 0 1 0 0 0 7 7 7 10 20 diff --git a/lib/Numeric/LinearAlgebra/Tests.hs b/lib/Numeric/LinearAlgebra/Tests.hs index c1dae4a..89c8297 100644 --- a/lib/Numeric/LinearAlgebra/Tests.hs +++ b/lib/Numeric/LinearAlgebra/Tests.hs @@ -279,6 +279,7 @@ runTests n = do && ident 5 == buildMatrix 5 5 (\(r,c) -> if r==c then 1::Double else 0) , utest "rank" $ rank ((2><3)[1,0,0,1,6*eps,0]) == 1 && rank ((2><3)[1,0,0,1,7*eps,0]) == 2 + , utest "block" $ fromBlocks [[ident 3,0],[0,ident 4]] == (ident 7 :: CM) ] return () -- cgit v1.2.3