Math.Linear.Sparse

Additive ring

class Additive f

negated

(^-^)

Vector space

class VectorSpace f

lerp

Hilbert space (inner product)

class Hilbert f

Normed vector space

class Normed f

Norms and related results

squared 2-norm

normSq

L1 norm

norm1

Euclidean norm

norm2

Lp norm (p > 0)

normP

infinity-norm

normInfty

normalize w.r.t. p-norm (p finite)

normalize

Lp inner product (p > 0)

dotLp

reciprocal

reciprocal

scale

scale

FiniteDim : finite-dimensional objects

class FiniteDim f

withDim

withDim2

HasData : accessing inner data (do not export)

class HasData f a

Sparse : sparse datastructures

class Sparse f a

Set : things that behave as sets (e.g. of which we can take the union and the intersection)

class Set f

IntMap implementation

Sparse Vector

data SpVector a

spySV

instances for SpVector

zeroSV

singletonSV

Create new sparse vector

mkSpVector

mkSpVectorD

mkSpVector1

fromListDenseSV

onesSV

zerosSV

insertSpVector

fromListSV

toListSV

toDenseListSV

lookupDenseSV

findWithDefault0IM

tailSV

headSV

concatSV

svToSM

Outer vector product

outerProdSV

(><)

Sparse Matrix

data SpMatrix a

Instances for SpMatrix

maxTup

minTup

emptySpMatrix

multiply matrix by a scalar

matScale

Frobenius norm (sqrt of trace of M^T M)

normFrobenius

MATRIX METADATA

type Rows

type Cols

type IxRow

type IxCol

predicates

validIxSM

isSquareSM

isDiagonalSM

immSM

dimSM

nelSM

nrows

ncols

data SMInfo

infoSM

nzSM

spySM

Non-zero elements in a row

nzRowU

nzRow

bandwidth bounds (min, max)

bwMinSM

bwMaxSM

bwBoundsSM

SPARSE MATRIX BUILDERS

zeroSM

insertSpMatrix

fromListSM'

fromListSM

fromListDenseSM

toDenseListSM

Diagonal matrix

mkDiagonal

Identity matrix

eye

ones

Create Super- or sub- diagonal matrix

mkSubDiagonal

encode

decode

SUB-MATRICES

extractSubmatrixSM

toSV

Extract jth column

extractColSM

extractCol

Extract ith row

extractRowSM

extractRow

MATRIX STACKING

vertStackSM

(-=-)

horizStackSM

(-||-)

MATRIX ELEMENT LOOKUP

lookupSM

lookupWD_SM

(@@)

lookupWD_IM

MISC SpMatrix OPERATIONS

foldlSM

ifoldlSM

countSubdiagonalNZSM

extractDiagonalDSM

subdiagIndicesSM

sparsify : remove 0s (!!!)

sparsifyIM2

sparsifySM

ROUNDING operations (!!!)

roundZeroOneSM

ALGEBRAIC PRIMITIVE OPERATIONS

Matrix transpose

transposeSM

(#^)

(#^#)

(##^)

matrix action on a vector

matVec

(#>)

vecMat

(<#)

Matrix-matrix product

matMatU

matMat

(##)

Matrix-matrix product, sparsified (prunes all elements x for which `abs x <= eps`)

matMatSparsified

(#~#)

Predicates

isOrthogonalSM

Condition number

conditionNumberSM

Householder transformation

hhMat

hhRefl

Givens rotation matrix

hypot

sign

givensCoef

givens

firstNonZeroColumn

candidateRows

QR decomposition

qr

gmats

Eigenvalue algorithms

All eigenvalues using QR algorithm

eigsQR

One eigenvalue and corresponding eigenvector, using Rayleigh iteration

rayleighStep

eigRayleigh

Householder vector (G & VL Alg. 5.1.1, function house)

hhV

SVD

LINEAR SOLVERS : solve A x = b

eps

residual

converged

CGS

cgsStep

data CGS

cgs

BiCSSTAB

bicgstabStep

data BICGSTAB

bicgstab

LINEAR SOLVERS INTERFACE

data LinSolveMethod

linSolveM

linSolve

(<\>)

PRETTY PRINTING

sizeStr

showNonZero

toDenseRow

toDenseRowClip

newline

printDenseSM

toDenseListClip

printDenseSV

Pretty printer typeclass

class PrintDense a

almostZero

almostOne

withDefault

roundZero

roundOne

with2Defaults

roundZeroOne

modifyUntil

loopUntilAcc

modifyInspectN

meanl

norm2l

diffSqL

untilConverged

normDiffConverged

runAppendN

runAppendN'

randMat

randVec

randSpMat

randSpVec

denseIxArray

denseIxArray2

foldrMap

foldlStrict

ifoldr

type LB

type UB

inBounds

inBounds2

inBounds0

inBounds02