matrices-0.5.0: native matrix based on vector

Safe HaskellNone
LanguageHaskell2010

Data.Matrix.Generic.Mutable

Contents

Synopsis

Mutable Matrix

data MMatrix v s a Source #

mutable matrix

Constructors

MMatrix !Int !Int !Int !Int !(v s a) 
Instances
MVector v a => MMatrix MMatrix v a Source # 
Instance details

Defined in Data.Matrix.Generic.Mutable

Methods

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 #

NFData (v s a) => NFData (MMatrix v s a) Source # 
Instance details

Defined in Data.Matrix.Generic.Mutable

Methods

rnf :: MMatrix v s a -> () #

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

takeRow :: MVector v a => MMatrix v m a -> Int -> v m a Source #

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

Derived methods

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

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

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

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

Create a mutable matrix without initialization

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