diff options
author | Alberto Ruiz <aruiz@um.es> | 2014-05-20 19:32:19 +0200 |
---|---|---|
committer | Alberto Ruiz <aruiz@um.es> | 2014-05-20 19:32:19 +0200 |
commit | 9412ef25f2a9d6f6ca233ef123a01c3f4145ffa4 (patch) | |
tree | b5c7ecd0534d0dc34242e53a3e66b87fc2ec0b0f /packages/base/src/Data/Packed/IO.hs | |
parent | d0fc6c7192badfa6f03baf0e02e0cf2a73c3906b (diff) |
random numbers in base
Diffstat (limited to 'packages/base/src/Data/Packed/IO.hs')
-rw-r--r-- | packages/base/src/Data/Packed/IO.hs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/packages/base/src/Data/Packed/IO.hs b/packages/base/src/Data/Packed/IO.hs index db03d5f..94fb30a 100644 --- a/packages/base/src/Data/Packed/IO.hs +++ b/packages/base/src/Data/Packed/IO.hs | |||
@@ -149,6 +149,8 @@ apparentCols s = f . dropWhile null . map words . lines <$> readFile s | |||
149 | f [] = 0 | 149 | f [] = 0 |
150 | f (x:_) = length x | 150 | f (x:_) = length x |
151 | 151 | ||
152 | |||
153 | -- | load a matrix from an ASCII file formatted as a 2D table. | ||
152 | loadMatrix :: FilePath -> IO (Matrix Double) | 154 | loadMatrix :: FilePath -> IO (Matrix Double) |
153 | loadMatrix f = do | 155 | loadMatrix f = do |
154 | v <- vectorScan f | 156 | v <- vectorScan f |