hmatrix-0.13.0.0: Linear algebra and numerical computation

Portabilityportable
Stabilityprovisional
MaintainerAlberto Ruiz <aruiz@um.es>

Data.Packed.ST

Contents

Description

In-place manipulation inside the ST monad. See examples/inplace.hs in the distribution.

Synopsis

Mutable Vectors

data STVector s t Source

newVector :: Storable t => t -> Int -> ST s (STVector s t)Source

runSTVector :: Storable t => (forall s. ST s (STVector s t)) -> Vector tSource

readVector :: Storable t => STVector s t -> Int -> ST s tSource

writeVector :: Storable t => STVector s t -> Int -> t -> ST s ()Source

modifyVector :: Storable t => STVector s t -> Int -> (t -> t) -> ST s ()Source

liftSTVector :: Storable t => (Vector t -> a) -> STVector s1 t -> ST s2 aSource

Mutable Matrices

data STMatrix s t Source

newMatrix :: Storable t => t -> Int -> Int -> ST s (STMatrix s t)Source

runSTMatrix :: Storable t => (forall s. ST s (STMatrix s t)) -> Matrix tSource

readMatrix :: Storable t => STMatrix s t -> Int -> Int -> ST s tSource

writeMatrix :: Storable t => STMatrix s t -> Int -> Int -> t -> ST s ()Source

modifyMatrix :: Storable t => STMatrix s t -> Int -> Int -> (t -> t) -> ST s ()Source

liftSTMatrix :: Storable t => (Matrix t -> a) -> STMatrix s1 t -> ST s2 aSource

Unsafe functions

unsafeWriteMatrix :: Storable t => STMatrix s t -> Int -> Int -> t -> ST s ()Source