From f4a1d1a8a268311ed10d3935ef079ccd1945fcd7 Mon Sep 17 00:00:00 2001 From: Daniel Wennberg Date: Wed, 7 May 2025 22:27:20 -0700 Subject: [PATCH] Clarify pros, cons and limitations of Cholesky and LDLt --- src/solvers/cholmod.jl | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/solvers/cholmod.jl b/src/solvers/cholmod.jl index 7cca3775..8fca80b6 100644 --- a/src/solvers/cholmod.jl +++ b/src/solvers/cholmod.jl @@ -1563,6 +1563,9 @@ Setting the optional `shift` keyword argument computes the factorization of it should be a permutation of `1:size(A,1)` giving the ordering to use (instead of CHOLMOD's default AMD ordering). +See also [`ldlt`](@ref) for a similar factorization that does not require +positive definiteness, but can be significantly slower than `cholesky`. + # Examples In the following example, the fill-reducing permutation used is `[3, 2, 1]`. @@ -1728,6 +1731,10 @@ To include the effects of permutation, it is typically preferable to extract `P'*L`) and `LtP = F.UP` (the equivalent of `L'*P`). The complete list of supported factors is `:L, :PtL, :D, :UP, :U, :LD, :DU, :PtLD, :DUP`. +Unlike the related Cholesky factorization, the ``LDL'`` factorization does not +require `A` to be positive definite. However, it still requires all leading +principal minors to be well-conditioned and will fail if this is not satisfied. + When `check = true`, an error is thrown if the decomposition fails. When `check = false`, responsibility for checking the decomposition's validity (via [`issuccess`](@ref)) lies with the user. @@ -1737,6 +1744,9 @@ Setting the optional `shift` keyword argument computes the factorization of it should be a permutation of `1:size(A,1)` giving the ordering to use (instead of CHOLMOD's default AMD ordering). +See also [`cholesky`](@ref) for a factorization that can be significantly +faster than `ldlt`, but requires `A` to be positive definite. + !!! note This method uses the CHOLMOD[^ACM887][^DavisHager2009] library from [SuiteSparse](https://github.com/DrTimothyAldenDavis/SuiteSparse). CHOLMOD only supports real or complex types in single or double precision.