blas-0.7: Bindings to the BLAS library

MaintainerPatrick Perry <>




Mutable dense matrices in the ST monad.


The STBanded data type

data STBanded s np e Source

Banded 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 STBanded s (n,p) e to STBanded s np e.
  • e: the element type of the matrix. Only certain element types are supported.


MatrixShaped (STBanded s) 
HasMatrixStorage (STBanded s) 
HasVectorView (STBanded s) 
Elem e => BaseBanded (STBanded s) e 
BLAS3 e => MSolve (Tri (STBanded s)) e (ST s) 
BLAS3 e => MMatrix (Tri (STBanded s)) e (ST s) 
BLAS3 e => MMatrix (Herm (STBanded s)) e (ST s) 
BLAS3 e => MMatrix (STBanded s) e (ST s) 
BLAS3 e => ReadBanded (STBanded s) e (ST s) 
Shaped (STBanded s) (Int, Int) 
BLAS3 e => WriteTensor (STBanded s) (Int, Int) e (ST s) 
BLAS3 e => ReadTensor (STBanded s) (Int, Int) e (ST s) 

runSTBanded :: (forall s. ST s (STBanded s n e)) -> Banded n eSource

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

Overloaded mutable banded matrix interface