Open Timeroot opened 2 years ago
Doesn't this just need the parent
to be extracted and send to the usual cholesky
?
No, to do a cholesky decomposition on a complex symmetric matrix is a distinct calculation from a cholesky decomposition on a Hermitian matrix. Notably, you can just use +, -, *, / as you would to do a (real symmetric) Cholesky decomposition, but you don't do any complex conjugation. The my_chol!
method above is missing the apostrophes (adjoints) from the current version of chol!
, and the sqrt(abs(x))
was replaced by just sqrt(x)
.
Does LAPACK have this (sorry I haven't looked it up)?
No, it doesn't. Maybe I should bother them first... :) but it would still be nice to have in Julia too.
Maybe a good place to add that is the GenericLinearAlgebra.jl package to start with. Don't we need some BLAS like stuff to make this fast?
I have a collection of positive-definite, symmetric, complex matrices I need to quickly solve linear systems on. Given the positive definiteness, I initially tried
cholesky
but that gave me the error:so I figured that wasn't supported. I tried
factorize
figuring that would pick the right method for the job. It fell back to Bunch-Kaufman, but then gave me the error:Ultimately the only current workaround is to explicitly turn my
Symmetric{ComplexF64}
into aMatrix{ComplexF64}
and then callfactorize
, or to directly calllu
myself. Either way, this loses any optimizations that could be done using the symmetry or, even better, the positive definiteness.Besides that BunchKaufman should work for complex symmetric matrices, Cholesky decomposition also works for PSD complex symmetric matrices; the difference is that M == L transpose(L) instead of L L'. Here's an implementation I made of a modified Cholesky decomposition for complex symmetric matrices:
(obviously the above can be cleaned up, I left it as-is to maximize similarity to existing
chol!
code.)If you want to try this out, here's a snippet with two simple test cases to try:
It would be nice to support
Symmetric{Complex}
matrices.