matrix-sized-0.1.1: Haskell matrix library with interface to C++ linear algebra libraries.

Safe HaskellNone
LanguageHaskell2010

Data.Matrix.Static.Sparse.Mutable

Contents

Synopsis

Mutable sparse matrix

data MSparseMatrix :: MMatrixKind where Source #

Column-major mutable matrix.

Constructors

MSparseMatrix 

Fields

  • :: (SingI r, SingI c)
     
  • => v s a

    Values: stores the coefficient values of the non-zeros.

  • -> Vector CInt

    InnerIndices: stores the row (resp. column) indices of the non-zeros.

  • -> Vector CInt

    OuterStarts: stores for each column (resp. row) the index of the first non-zero in the previous two arrays.

  • -> Vector CInt
     
  • -> MSparseMatrix r c v s a
     
Instances
MVector v a => MMatrix MSparseMatrix v a Source # 
Instance details

Defined in Data.Matrix.Static.Sparse.Mutable

Methods

dim :: MSparseMatrix r c v s a -> (Int, Int) Source #

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

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

unsafeModify :: PrimMonad s => MSparseMatrix r c v (PrimState s) a -> (a -> a) -> (Int, Int) -> s () Source #

fill :: PrimMonad s => MSparseMatrix r c v (PrimState s) a -> a -> s () Source #

new :: (SingI r, SingI c, PrimMonad s) => s (MSparseMatrix r c v (PrimState s) a) Source #

replicate :: (SingI r, SingI c, PrimMonad s) => a -> s (MSparseMatrix r c v (PrimState s) a) Source #