summaryrefslogtreecommitdiff
path: root/packages/base/src/Data/Packed/Matrix.hs
diff options
context:
space:
mode:
authorAlberto Ruiz <aruiz@um.es>2014-05-24 13:32:58 +0200
committerAlberto Ruiz <aruiz@um.es>2014-05-24 13:32:58 +0200
commit5b6de561f131d75049fdb999e98a07939ec2e8e7 (patch)
treeb662ce05f56e2c4aa67243b0030a4786dc1fef0b /packages/base/src/Data/Packed/Matrix.hs
parent0a9ef8f5b0088c1ac25175bffca4ed95d9e109a5 (diff)
backward compatibility
Diffstat (limited to 'packages/base/src/Data/Packed/Matrix.hs')
-rw-r--r--packages/base/src/Data/Packed/Matrix.hs13
1 files changed, 6 insertions, 7 deletions
diff --git a/packages/base/src/Data/Packed/Matrix.hs b/packages/base/src/Data/Packed/Matrix.hs
index b3be823..2acb31a 100644
--- a/packages/base/src/Data/Packed/Matrix.hs
+++ b/packages/base/src/Data/Packed/Matrix.hs
@@ -226,15 +226,12 @@ takeDiag m = fromList [flatten m `at` (k*cols m+k) | k <- [0 .. min (rows m) (co
226 226
227------------------------------------------------------------ 227------------------------------------------------------------
228 228
229{- | An easy way to create a matrix: 229{- | create a general matrix
230 230
231>>> (2><3)[2,4,7,-3,11,0] 231>>> (2><3) [2, 4, 7+2*𝑖, -3, 11, 0]
232(2><3) 232(2><3)
233 [ 2.0, 4.0, 7.0 233 [ 2.0 :+ 0.0, 4.0 :+ 0.0, 7.0 :+ 2.0
234 , -3.0, 11.0, 0.0 ] 234 , (-3.0) :+ (-0.0), 11.0 :+ 0.0, 0.0 :+ 0.0 ]
235
236This is the format produced by the instances of Show (Matrix a), which
237can also be used for input.
238 235
239The input list is explicitly truncated, so that it can 236The input list is explicitly truncated, so that it can
240safely be used with lists that are too long (like infinite lists). 237safely be used with lists that are too long (like infinite lists).
@@ -244,6 +241,8 @@ safely be used with lists that are too long (like infinite lists).
244 [ 1.0, 2.0, 3.0 241 [ 1.0, 2.0, 3.0
245 , 4.0, 5.0, 6.0 ] 242 , 4.0, 5.0, 6.0 ]
246 243
244This is the format produced by the instances of Show (Matrix a), which
245can also be used for input.
247 246
248-} 247-}
249(><) :: (Storable a) => Int -> Int -> [a] -> Matrix a 248(><) :: (Storable a) => Int -> Int -> [a] -> Matrix a