-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
inconsistent Hermitian-ness of SymTridiagonal{Complex} #9524
Comments
This problem might be a good motivation to get started on #8240. We could:
|
@stevengj I wonder if it is only a bug in @jiahao There are some considerations about extra memory allocation here.
|
@andreasnoack, a simple example is for a 1d I agree that the short-term fix is just to change |
I'm not super-concerned about the memory required by the extra diagonal, since it is only a constant factor....it's hard for me to imagine a case in which a tridiagonal solver is memory-bound. |
I have now fixed the We should start experimenting with some of the ideas proposed by @jiahao to find the right way of expressing a Hermitian tridiagonal matrix for 0.4.
No, I think you are right. It will probably not matter for perfomance. |
Okay closing this in favor of #8240 now that the behavior is consistent. |
Julia is inconsistent about whether
SymTridiagonal
is Hermitian or merely symmetric for complex types.The comment at the top of
tridiag.jl
says that it represents "Hermitian tridiagonal matrices". The manual says that it is a "real symmetric tridiagonal matrix", which is clearly wrong since complex elements are allowed.If I define
A = SymTridiagonal([1,2],[3im])
, it prints as:but
full(A)
givesand worse,
A * x
andfull(A) * x
disagree.The
SymTridiagonal(A::AbstractMatrix)
constructor requires thatA
be symmetric, not Hermitian, andtranspose
is defined to be the identity whilectranspose
conjugates it (i.e. it treats the matrix as symmetric, not Hermitian).My feeling is that making it Hermitian would be much more useful. Factorization right now is of the
L*D*L.'
form, but of course we could useL*D*L'
for Hermitian matrices. Cholesky could be supported. And efficient eigensolvers exist because complex-Hermitian matrices are trivially (via a diagonal unitary scaling) similar to real-symmetric matrices.I guess there is a place for complex-symmetric tridiagonal matrices too, but I don't see that we gain much in that case vs. just using
Tridiagonal
.cc: @andreasnoack, @jiahao
The text was updated successfully, but these errors were encountered: