blas-0.7.6: Bindings to the BLAS library

Stabilityexperimental
MaintainerPatrick Perry <patperry@stanford.edu>

Data.Matrix.Dense.ST

Contents

Description

Mutable dense matrices in the ST monad.

Synopsis

The STMatrix data type

data STMatrix s np e Source

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

  • s: the state variable argument for the ST type
  • np: a phantom type for the shape of the matrix. Most functions will demand that this be specified as a pair. When writing a function signature, you should always prefer STMatrix s (n,p) e to STMatrix s np e.
  • e: the element type of the matrix. Only certain element types are supported.

Instances

MatrixShaped (STMatrix s) 
HasVectorView (STMatrix s) 
Elem e => BaseMatrix (STMatrix s) e 
BLAS3 e => MSolve (Tri (STMatrix s)) e (ST s) 
BLAS3 e => MMatrix (Herm (STMatrix s)) e (ST s) 
BLAS3 e => MMatrix (Tri (STMatrix s)) e (ST s) 
BLAS3 e => MMatrix (STMatrix s) e (ST s) 
BLAS3 e => WriteMatrix (STMatrix s) e (ST s) 
BLAS3 e => ReadMatrix (STMatrix s) e (ST s) 
Shaped (STMatrix s) (Int, Int) 
BLAS1 e => WriteTensor (STMatrix s) (Int, Int) e (ST s) 
Elem e => ReadTensor (STMatrix s) (Int, Int) e (ST s) 

runSTMatrix :: (forall s. ST s (STMatrix s n e)) -> Matrix n eSource

A safe way to create and work with a mutable matrix before returning an immutable matrix for later perusal. This function avoids copying the matrix before returning it - it uses unsafeFreezeMatrix internally, but this wrapper is a safe interface to that function.

Overloaded mutable dense matrix interface