matrices-0.5.0: native matrix based on vector

Safe HaskellNone
LanguageHaskell2010

Data.Matrix.Class.Mutable

Synopsis

Documentation

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

Methods

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 # 
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 #

MVector v a => MMatrix SymMMatrix v a Source # 
Instance details

Defined in Data.Matrix.Symmetric.Generic.Mutable

Methods

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 #

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

Derived methods

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