Copyright | (c) Alberto Ruiz 2008 |
---|---|
License | GPL-style |
Maintainer | Alberto Ruiz <aruiz@um.es> |
Stability | provisional |
Portability | portable |
Safe Haskell | None |
Language | Haskell98 |
In-place manipulation inside the ST monad. See examples/inplace.hs in the distribution.
- data STVector s t
- newVector :: Storable 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 :: Storable 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
- newUndefinedVector :: Storable t => Int -> ST s (STVector s t)
- 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)
- newUndefinedMatrix :: Storable t => MatrixOrder -> Int -> Int -> ST s (STMatrix s 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
Mutable Matrices
Unsafe functions
newUndefinedMatrix :: Storable t => MatrixOrder -> Int -> Int -> ST s (STMatrix s t) Source