LDLᵀ{TL,TD}(Ls::Vector{TL}, Ds::Vector{TD})

A lazy representation of L * D * L' that supports the following functions:

  • +(::LDLᵀ, ::LDLᵀ) and +(::LDLᵀ{TL,TD}, ::Tuple{TL,TD})
  • *(::Real, ::LDLᵀ)
  • size
  • rank which yields the length of the inner dimension, i.e. size(D, 1)
  • zero which yields a rank 0 representation
  • concatenate! (expert use only)
  • compress! (expert use only)

Iterating the structure yields L::TL and D::TD. This calls compress!, if necessary.

For convenience, the structure might be converted to a matrix via Matrix. It is recommended to use this only for testing.

LowRankUpdate{TA,T,TU,TV}(A::TA, α::T, U::TU, V::TV)

Lazy representation of A + inv(α)*U*V that supports the following functions:

  • \ via the Sherman-Morrison-Woodbury formula
  • +(::LowRankUpdate, ::AbstractMatrix) to update A
  • adjoint which returns a LowRankUpdate
  • size

Iterating the structure produces the components A, α, U and V.

It is recommended to use lr_update to create a suitable representation of A + inv(α)*U*V.


Concatenate the internal components such that L and D may be obtained via L, D = X. This function is roughly equivalent to L = foldl(hcat, X.Ls) and D = foldl(dcat, Ds), where dcat is pseudo-code for "diagonal concatenation".

This is a somewhat cheap operation.

See also: compress!

lr_update(A::Matrix, α, U, V)
lr_update(A::AbstractSparseMatrixCSC, α, U, V)

Return a suitable representation of A + inv(α)*U*V. For dense A, compute A + inv(α)*U*V directly. For sparse A, return a LowRankUpdate.

  • Lang2015N Lang, H Mena, and J Saak, "On the benefits of the LDLT factorization for large-scale differential matrix equation solvers" Linear Algebra and its Applications 480 (2015): 44-71. doi:10.1016/j.laa.2015.04.006