Data.Sparse.SpMatrix

Sparse Matrix

data SpMatrix a

sizeStr

Creation

zeroSM

Diagonal matrix

mkDiagonal

Identity matrix

eye

Permutation matrix

permutationSM

permutPairsSM

Super- or sub- diagonal matrix

mkSubDiagonal

Element insertion

insertSpMatrix

fromList

fromListSM'

fromListSM

fromListDenseSM

toList

toDenseListSM

Lookup

lookupSM

lookupWD_SM

(@@!)

(@@)

lookupWD_IM

Sub-matrices

extractSubmatrixSM

extractSubmatrixRebalanceKeys

extractSubmatrix

Extract i'th row

extractRowSM

extractSubRowSM

extractSubRowSM_RK

Extract j'th column

extractColSM

extractSubColSM

extractSubColSM_RK

Predicates

isValidIxSM

isSquareSM

isDiagonalSM

isOrthogonalSM

Matrix data and metadata

immSM

dimSM

nelSM

nrows

ncols

data SMInfo

infoSM

nzSM

spySM

Non-zero elements in a row

nzRow

Bandwidth bounds (min, max)

bwMinSM

bwMaxSM

bwBoundsSM

Matrix stacking

vertStackSM

(-=-)

horizStackSM

(-||-)

Misc. SpMatrix operations

foldlSM

ifoldlSM

countSubdiagonalNZSM

subdiagIndicesSM

Sparsify : remove almost-0 elements (|x| < eps)

sparsifyIM2

sparsifySM

Value rounding

roundZeroOneSM

Primitive algebra operations

Matrix row swap

swapRows

swapRowsSafe

Matrix transpose

transposeSM

(#^)

Multiply matrix by a scalar

matScale

Frobenius norm

normFrobenius

Matrix-matrix product

matMat

(##)

Matrix-matrix product, sparsified

matMatSparsified

(#~#)

Sparsified matrix products of two matrices

(#^#)

(##^)

Matrix contraction

contractSub