Safe Haskell | None |
---|---|

Language | Haskell2010 |

## Synopsis

- class MVector v a => MMatrix m v a where
- dim :: m v s a -> (Int, Int)
- unsafeRead :: PrimMonad s => m v (PrimState s) a -> (Int, Int) -> s a
- unsafeWrite :: PrimMonad s => m v (PrimState s) a -> (Int, Int) -> a -> s ()
- new :: PrimMonad s => (Int, Int) -> s (m v (PrimState s) a)
- replicate :: PrimMonad s => (Int, Int) -> a -> s (m v (PrimState s) a)

- write :: (PrimMonad s, MMatrix m v a) => m v (PrimState s) a -> (Int, Int) -> a -> s ()
- read :: (PrimMonad s, MMatrix m v a) => m v (PrimState s) a -> (Int, Int) -> s a

# Documentation

class MVector v a => MMatrix m v a where Source #

dim :: m v s a -> (Int, Int) Source #

unsafeRead :: PrimMonad s => m v (PrimState s) a -> (Int, Int) -> s a Source #

unsafeWrite :: PrimMonad s => m v (PrimState s) a -> (Int, Int) -> a -> s () Source #

new :: PrimMonad s => (Int, Int) -> s (m v (PrimState s) a) Source #

Create a mutable matrix without initialization

replicate :: PrimMonad s => (Int, Int) -> a -> s (m v (PrimState s) a) Source #

## Instances

MVector v a => MMatrix MMatrix v a Source # | |

Defined in Data.Matrix.Generic.Mutable dim :: MMatrix v s a -> (Int, Int) Source # unsafeRead :: PrimMonad s => MMatrix v (PrimState s) a -> (Int, Int) -> s a Source # unsafeWrite :: PrimMonad s => MMatrix v (PrimState s) a -> (Int, Int) -> a -> s () Source # new :: PrimMonad s => (Int, Int) -> s (MMatrix v (PrimState s) a) Source # replicate :: PrimMonad s => (Int, Int) -> a -> s (MMatrix v (PrimState s) a) Source # | |

MVector v a => MMatrix SymMMatrix v a Source # | |

Defined in Data.Matrix.Symmetric.Generic.Mutable dim :: SymMMatrix v s a -> (Int, Int) Source # unsafeRead :: PrimMonad s => SymMMatrix v (PrimState s) a -> (Int, Int) -> s a Source # unsafeWrite :: PrimMonad s => SymMMatrix v (PrimState s) a -> (Int, Int) -> a -> s () Source # new :: PrimMonad s => (Int, Int) -> s (SymMMatrix v (PrimState s) a) Source # replicate :: PrimMonad s => (Int, Int) -> a -> s (SymMMatrix v (PrimState s) a) Source # |