Copyright | (c) Alberto Ruiz 2007-14 |
---|---|
License | GPL |
Maintainer | Alberto Ruiz |
Stability | provisional |
Safe Haskell | None |
Language | Haskell98 |
- data RandDist
- randomVector :: Int -> RandDist -> Int -> Vector Double
- saveMatrix :: FilePath -> String -> Matrix Double -> IO ()
- fwriteVector :: FilePath -> Vector Double -> IO ()
- freadVector :: FilePath -> Int -> IO (Vector Double)
- fprintfVector :: FilePath -> String -> Vector Double -> IO ()
- fscanfVector :: FilePath -> Int -> IO (Vector Double)
- fileDimensions :: FilePath -> IO (Int, Int)
- loadMatrix :: FilePath -> IO (Matrix Double)
- fromFile :: FilePath -> (Int, Int) -> IO (Matrix Double)
Documentation
Obtains a vector of pseudorandom elements from the the mt19937 generator in GSL, with a given seed. Use randomIO to get a random seed.
Saves a matrix as 2D ASCII table.
fwriteVector :: FilePath -> Vector Double -> IO () Source #
Saves the elements of a vector to a binary file.
freadVector :: FilePath -> Int -> IO (Vector Double) Source #
Loads a vector from a binary file (the number of elements must be known in advance).
fprintfVector :: FilePath -> String -> Vector Double -> IO () Source #
Saves the elements of a vector, with a given format (%f, %e, %g), to an ASCII file.
fscanfVector :: FilePath -> Int -> IO (Vector Double) Source #
Loads a vector from an ASCII file (the number of elements must be known in advance).
fileDimensions :: FilePath -> IO (Int, Int) Source #
obtains the number of rows and columns in an ASCII data file (provisionally using unix's wc).