KLU.jl

Documentation for KLU.jl

KLU.kluFunction
klu(A::SparseMatrixCSC) -> K::KLUFactorization
klu(n, colptr::Vector{Ti}, rowval::Vector{Ti}, nzval::Vector{Tv}) -> K::KLUFactorization

Compute the LU factorization of a sparse matrix A using KLU.

For sparse A with real or complex element type, the return type of K is KLUFactorization{Tv, Ti}, with Tv = Float64 or ComplexF64 respectively and Ti is an integer type (Int32 or Int64).

The individual components of the factorization K can be accessed by indexing:

ComponentDescription
LL (lower triangular) part of LU of the diagonal blocks
UU (upper triangular) part of LU of the diagonal blocks
FF (upper triangular) part of LU + F, the off-diagonal blocks
pright permutation Vector
qleft permutation Vector
RsVector of scaling factors

The relation between K and A is

K.L * K.U + K.F == K.Rs` A[K.p, K.q]`

K further supports the following functions:

  • LinearAlgebra.\
Note

klu(A::SparseMatrixCSC) uses the KLU library that is part of SuiteSparse. As this library only supports sparse matrices with Float64 or ComplexF64 elements, lu converts A into a copy that is of type SparseMatrixCSC{Float64} or SparseMatrixCSC{ComplexF64} as appropriate.