diff options
-rw-r--r-- | hmatrix.cabal | 2 | ||||
-rw-r--r-- | lib/Data/Packed/Matrix.hs | 2 | ||||
-rw-r--r-- | lib/Numeric/LinearAlgebra/Tests.hs | 1 |
3 files changed, 4 insertions, 1 deletions
diff --git a/hmatrix.cabal b/hmatrix.cabal index a04516f..0037ad0 100644 --- a/hmatrix.cabal +++ b/hmatrix.cabal | |||
@@ -6,7 +6,7 @@ Author: Alberto Ruiz | |||
6 | Maintainer: Alberto Ruiz <aruiz@um.es> | 6 | Maintainer: Alberto Ruiz <aruiz@um.es> |
7 | Stability: provisional | 7 | Stability: provisional |
8 | Homepage: http://code.haskell.org/hmatrix | 8 | Homepage: http://code.haskell.org/hmatrix |
9 | Synopsis: Linear algebra and numerical computations | 9 | Synopsis: Linear algebra and numerical computation |
10 | Description: Purely functional interface to basic linear algebra | 10 | Description: Purely functional interface to basic linear algebra |
11 | and other numerical computations, internally implemented using | 11 | and other numerical computations, internally implemented using |
12 | GSL, BLAS and LAPACK. | 12 | GSL, BLAS and LAPACK. |
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: | |||
60 | \> let vector xs = fromList xs :: Vector Double | 60 | \> let vector xs = fromList xs :: Vector Double |
61 | \> let diagl = diag . vector | 61 | \> let diagl = diag . vector |
62 | \> let rowm = asRow . vector | 62 | \> let rowm = asRow . vector |
63 | |||
63 | \> disp $ fromBlocks [[ident 5, 7, rowm[10,20]], [3, diagl[1,2,3], 0]] | 64 | \> disp $ fromBlocks [[ident 5, 7, rowm[10,20]], [3, diagl[1,2,3], 0]] |
65 | |||
64 | 8x10 | 66 | 8x10 |
65 | 1 0 0 0 0 7 7 7 10 20 | 67 | 1 0 0 0 0 7 7 7 10 20 |
66 | 0 1 0 0 0 7 7 7 10 20 | 68 | 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 | |||
279 | && ident 5 == buildMatrix 5 5 (\(r,c) -> if r==c then 1::Double else 0) | 279 | && ident 5 == buildMatrix 5 5 (\(r,c) -> if r==c then 1::Double else 0) |
280 | , utest "rank" $ rank ((2><3)[1,0,0,1,6*eps,0]) == 1 | 280 | , utest "rank" $ rank ((2><3)[1,0,0,1,6*eps,0]) == 1 |
281 | && rank ((2><3)[1,0,0,1,7*eps,0]) == 2 | 281 | && rank ((2><3)[1,0,0,1,7*eps,0]) == 2 |
282 | , utest "block" $ fromBlocks [[ident 3,0],[0,ident 4]] == (ident 7 :: CM) | ||
282 | ] | 283 | ] |
283 | return () | 284 | return () |
284 | 285 | ||