hmatrix-0.4.0.0: Linear algebra and numerical computationsSource codeContentsIndex
Data.Packed.ST
Portabilityportable
Stabilityprovisional
MaintainerAlberto Ruiz <aruiz@um.es>
Contents
Mutable Vectors
Mutable Matrices
Unsafe functions
Description
In-place manipulation inside the ST monad. See examples/inplace.hs in the distribution.
Synopsis
data STVector s t
newVector :: Element t => t -> Int -> ST s (STVector s t)
thawVector :: Storable t => Vector t -> ST s (STVector s t)
freezeVector :: Storable t => STVector s1 t -> ST s2 (Vector t)
runSTVector :: Storable t => (forall s. ST s (STVector s t)) -> Vector t
readVector :: Storable t => STVector s t -> Int -> ST s t
writeVector :: Storable t => STVector s t -> Int -> t -> ST s ()
modifyVector :: Storable t => STVector s t -> Int -> (t -> t) -> ST s ()
liftSTVector :: Storable t => (Vector t -> a) -> STVector s1 t -> ST s2 a
data STMatrix s t
newMatrix :: Element t => t -> Int -> Int -> ST s (STMatrix s t)
thawMatrix :: Storable t => Matrix t -> ST s (STMatrix s t)
freezeMatrix :: Storable t => STMatrix s1 t -> ST s2 (Matrix t)
runSTMatrix :: Storable t => (forall s. ST s (STMatrix s t)) -> Matrix t
readMatrix :: Storable t => STMatrix s t -> Int -> Int -> ST s t
writeMatrix :: Storable t => STMatrix s t -> Int -> Int -> t -> ST s ()
modifyMatrix :: Storable t => STMatrix s t -> Int -> Int -> (t -> t) -> ST s ()
liftSTMatrix :: Storable t => (Matrix t -> a) -> STMatrix s1 t -> ST s2 a
unsafeReadVector :: Storable t => STVector s t -> Int -> ST s t
unsafeWriteVector :: Storable t => STVector s t -> Int -> t -> ST s ()
unsafeThawVector :: Storable t => Vector t -> ST s (STVector s t)
unsafeFreezeVector :: Storable t => STVector s1 t -> ST s2 (Vector t)
unsafeReadMatrix :: Storable t => STMatrix s t -> Int -> Int -> ST s t
unsafeWriteMatrix :: Storable t => STMatrix s t -> Int -> Int -> t -> ST s ()
unsafeThawMatrix :: Storable t => Matrix t -> ST s (STMatrix s t)
unsafeFreezeMatrix :: Storable t => STMatrix s1 t -> ST s2 (Matrix t)
Mutable Vectors
data STVector s t Source
newVector :: Element t => t -> Int -> ST s (STVector s t)Source
thawVector :: Storable t => Vector t -> ST s (STVector s t)Source
freezeVector :: Storable t => STVector s1 t -> ST s2 (Vector 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 :: Element t => t -> Int -> Int -> ST s (STMatrix s t)Source
thawMatrix :: Storable t => Matrix t -> ST s (STMatrix s t)Source
freezeMatrix :: Storable t => STMatrix s1 t -> ST s2 (Matrix 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
unsafeReadVector :: Storable t => STVector s t -> Int -> ST s tSource
unsafeWriteVector :: Storable t => STVector s t -> Int -> t -> ST s ()Source
unsafeThawVector :: Storable t => Vector t -> ST s (STVector s t)Source
unsafeFreezeVector :: Storable t => STVector s1 t -> ST s2 (Vector t)Source
unsafeReadMatrix :: Storable t => STMatrix s t -> Int -> Int -> ST s tSource
unsafeWriteMatrix :: Storable t => STMatrix s t -> Int -> Int -> t -> ST s ()Source
unsafeThawMatrix :: Storable t => Matrix t -> ST s (STMatrix s t)Source
unsafeFreezeMatrix :: Storable t => STMatrix s1 t -> ST s2 (Matrix t)Source
Produced by Haddock version 2.4.2