| Stability | experimental |
|---|---|
| Maintainer | Patrick Perry <patperry@stanford.edu> |
Data.Matrix.Dense.IO
Description
Mutable dense matrices in the IO monad.
- data IOMatrix np e
- withIOMatrix :: IOMatrix (n, p) e -> (Ptr e -> IO a) -> IO a
- matrixViewArray :: Elem e => ForeignPtr e -> Int -> (Int, Int) -> IOMatrix (n, p) e
- matrixViewArrayWithLda :: Elem e => Int -> ForeignPtr e -> Int -> (Int, Int) -> IOMatrix (n, p) e
- module Data.Matrix.Dense.Class
The IOMatrix data type
Dense matrix in the IO monad. The type arguments are as follows:
-
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 preferIOMatrix (n,p) etoIOMatrix np e. -
e: the element type of the matrix. Only certain element types are supported.
Instances
| MatrixShaped IOMatrix | |
| HasVectorView IOMatrix | |
| Elem e => BaseMatrix IOMatrix e | |
| BLAS3 e => MMatrix IOMatrix e IO | |
| BLAS3 e => WriteMatrix IOMatrix e IO | |
| BLAS3 e => ReadMatrix IOMatrix e IO | |
| Shaped IOMatrix (Int, Int) | |
| BLAS1 e => WriteTensor IOMatrix (Int, Int) e IO | |
| Elem e => ReadTensor IOMatrix (Int, Int) e IO | |
| BLAS3 e => MSolve (Tri IOMatrix) e IO | |
| BLAS3 e => MMatrix (Herm IOMatrix) e IO | |
| BLAS3 e => MMatrix (Tri IOMatrix) e IO |
withIOMatrix :: IOMatrix (n, p) e -> (Ptr e -> IO a) -> IO aSource
Perform an IO action with a pointer to the first element of the
matrix.
View an array in memory as a matrix.
Arguments
| :: Elem e | |
| => Int | leading dimension size |
| -> ForeignPtr e | |
| -> Int | offset |
| -> (Int, Int) | shape |
| -> IOMatrix (n, p) e |
View an array in memory as a matrix, with the given leading dimension size.
Overloaded mutable dense matrix interface
module Data.Matrix.Dense.Class