diff options
author | Alberto Ruiz <aruiz@um.es> | 2009-05-16 17:12:44 +0000 |
---|---|---|
committer | Alberto Ruiz <aruiz@um.es> | 2009-05-16 17:12:44 +0000 |
commit | 1412579714611555ae6263aed1bd8ffe71fa5961 (patch) | |
tree | 626ccf93c43418978e975f7a20c8604c8d76f6ff /lib/Data/Packed/Internal/Matrix.hs | |
parent | 37f71ca5188ba487d4e1c274873b187ddcb30576 (diff) |
loadMatrix (based on wc)
Diffstat (limited to 'lib/Data/Packed/Internal/Matrix.hs')
-rw-r--r-- | lib/Data/Packed/Internal/Matrix.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Data/Packed/Internal/Matrix.hs b/lib/Data/Packed/Internal/Matrix.hs index 8a074a6..7678a12 100644 --- a/lib/Data/Packed/Internal/Matrix.hs +++ b/lib/Data/Packed/Internal/Matrix.hs | |||
@@ -351,7 +351,7 @@ fromComplex :: Vector (Complex Double) -> (Vector Double, Vector Double) | |||
351 | fromComplex z = (r,i) where | 351 | fromComplex z = (r,i) where |
352 | [r,i] = toColumns $ reshape 2 $ asReal z | 352 | [r,i] = toColumns $ reshape 2 $ asReal z |
353 | 353 | ||
354 | -- | loads a matrix efficiently from formatted ASCII text file (the number of rows and columns must be known in advance). | 354 | -- | loads a matrix from an ASCII file (the number of rows and columns must be known in advance). |
355 | fromFile :: FilePath -> (Int,Int) -> IO (Matrix Double) | 355 | fromFile :: FilePath -> (Int,Int) -> IO (Matrix Double) |
356 | fromFile filename (r,c) = do | 356 | fromFile filename (r,c) = do |
357 | charname <- newCString filename | 357 | charname <- newCString filename |