Stability | experimental |
---|---|
Maintainer | Patrick Perry <patperry@stanford.edu> |
Mutable vectors in the ST monad.
- runSTVector :: (forall s. ST s (STVector s n e)) -> Vector n e
- data STVector s n e
- module Data.Vector.Dense.Class
The STVector
data type
runSTVector :: (forall s. ST s (STVector s n e)) -> Vector n eSource
A safe way to create and work with a mutable vector before returning an immutable vector for later perusal. This function avoids copying the vector before returning it - it uses unsafeFreezeVector internally, but this wrapper is a safe interface to that function.
Dense vectors in the ST
monad. The type arguments are as follows:
-
s
: the state variable argument for theST
type -
n
: a phantom type for the dimension of the vector -
e
: the element type of the vector. Only certain element types are supported.
Shaped (STVector s) Int | |
Elem e => BaseVector (STVector s) e | |
BLAS1 e => WriteTensor (STVector s) Int e (ST s) | |
Elem e => ReadTensor (STVector s) Int e (ST s) | |
BLAS1 e => WriteVector (STVector s) e (ST s) | |
BLAS1 e => ReadVector (STVector s) e (ST s) |
Overloaded mutable dense vector interface
module Data.Vector.Dense.Class