hmatrix-0.5.1.1: Linear algebra and numerical computations

Portabilityportable
Stabilityprovisional
MaintainerAlberto Ruiz <aruiz@um.es>

Data.Packed.Convert

Description

Conversion of Vectors and Matrices to and from the standard Haskell arrays. (provisional)

Synopsis

Documentation

arrayFromVector :: Storable t => Vector t -> Array Int tSource

creates an immutable Array from an hmatrix Vector (to do: unboxed)

mArrayFromVector :: (MArray b t (ST s), Storable t) => Vector t -> ST s (b Int t)Source

creates a mutable array from an hmatrix Vector (to do: unboxed)

vectorFromMArray :: (Storable t, MArray a t (ST s)) => a Int t -> ST s (Vector t)Source

creates a mutable Array from an hmatrix Vector for manipulation with runSTUArray (to do: unboxed)

vectorToStorableArray :: Storable t => Vector t -> IO (StorableArray Int t)Source

Creates a StorableArray indexed from 0 to dim -1. (Memory is efficiently copied, so you can then freely modify the obtained array)

storableArrayToVector :: Storable t => StorableArray Int t -> IO (Vector t)Source

Creates a Vector from a StorableArray. (Memory is efficiently copied, so posterior changes in the array will not affect the result)