hmatrix-gsl-0.18.2.0: Numerical computation

Copyright(c) Alberto Ruiz 2007-14
LicenseGPL
MaintainerAlberto Ruiz
Stabilityprovisional
Safe HaskellNone
LanguageHaskell98

Numeric.GSL.LinearAlgebra

Description

 

Synopsis

Documentation

data RandDist Source #

Constructors

Uniform

uniform distribution in [0,1)

Gaussian

normal distribution with mean zero and standard deviation one

randomVector Source #

Arguments

:: Int

seed

-> RandDist

distribution

-> Int

vector size

-> Vector Double 

Obtains a vector of pseudorandom elements from the the mt19937 generator in GSL, with a given seed. Use randomIO to get a random seed.

saveMatrix Source #

Arguments

:: FilePath 
-> String

format (%f, %g, %e)

-> Matrix Double 
-> IO () 

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).

loadMatrix :: FilePath -> IO (Matrix Double) Source #

Loads a matrix from an ASCII file formatted as a 2D table.

fromFile :: FilePath -> (Int, Int) -> IO (Matrix Double) Source #

Loads a matrix from an ASCII file (the number of rows and columns must be known in advance).