blas-0.7.1: Bindings to the BLAS library

Stabilityexperimental
MaintainerPatrick Perry <patperry@stanford.edu>

Data.Vector.Dense.ST

Contents

Description

Mutable vectors in the ST monad.

Synopsis

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.

data STVector s n e Source

Dense vectors in the ST monad. The type arguments are as follows:

  • s: the state variable argument for the ST type
  • n: a phantom type for the dimension of the vector
  • e: the element type of the vector. Only certain element types are supported.

Instances

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