sparse-lin-alg-0.4: Effective linear algebra on sparse matrices

Safe HaskellSafe-Infered

Math.LinearAlgebra.Sparse.Algorithms.Diagonal

Synopsis

Documentation

isDiag :: SparseMatrix α -> BoolSource

Checks if matrix has diagonal form

toDiag :: Integral α => SparseMatrix α -> (SparseMatrix α, SparseMatrix α, SparseMatrix α)Source

Transforms matrix to diagonal form and returns also two protocol matrices:

>>> let (d,t,u) = toDiag m  in t × m × (trans u) == d
True

t stores rows transformations and u — columns transformations