diff options
author | Alberto Ruiz <aruiz@um.es> | 2014-05-24 13:32:58 +0200 |
---|---|---|
committer | Alberto Ruiz <aruiz@um.es> | 2014-05-24 13:32:58 +0200 |
commit | 5b6de561f131d75049fdb999e98a07939ec2e8e7 (patch) | |
tree | b662ce05f56e2c4aa67243b0030a4786dc1fef0b /packages/base/src/Data/Packed/Matrix.hs | |
parent | 0a9ef8f5b0088c1ac25175bffca4ed95d9e109a5 (diff) |
backward compatibility
Diffstat (limited to 'packages/base/src/Data/Packed/Matrix.hs')
-rw-r--r-- | packages/base/src/Data/Packed/Matrix.hs | 13 |
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 | |||
236 | This is the format produced by the instances of Show (Matrix a), which | ||
237 | can also be used for input. | ||
238 | 235 | ||
239 | The input list is explicitly truncated, so that it can | 236 | The input list is explicitly truncated, so that it can |
240 | safely be used with lists that are too long (like infinite lists). | 237 | safely 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 | ||
244 | This is the format produced by the instances of Show (Matrix a), which | ||
245 | can 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 |