-
-
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
RFC: Lyapunov / Sylvester solver via LAPack xTRSYL #7435
Conversation
|
# AX + XB + C = 0 | ||
function sylvester{T<:BlasFloat}(A::StridedMatrix{T},B::StridedMatrix{T},C::StridedMatrix{T}) | ||
RA, QA = schur(A) | ||
RB, QB = schur(B') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would be nicer to avoid explicit transpositions (and the resultant matrix copies). Can't you use schur(B)
and then compensate with the corresponding opB
argument of trysyl
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, if QRQ' = B
then (QRQ')' = QR'Q' = B'
...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems like it is even easier than that, because trysyl allows you to implicitly treat one of the matrices as transposed.
Needs documentation too. |
Thank you for going through this with me. I did not push the documentation commit, comes in a minute. |
Your tests seem to have changed the indentation on the entire test file. That makes it difficult to see what has changed. Could you fix that? |
Cc: @andreasnoackjensen |
and taking some tests out of the inner loop in linalg1.jl
I followed @stevengj's Tips and restored the skew indentation. One can fix the indentation later. |
The test failed in |
Looking good, except for the mysterious test failure. |
Seems safe to include in 0.3. Any reservations? |
Apparently this was an intermittent failure which went away with the last commit. |
RFC: Lyapunov / Sylvester solver via LAPack xTRSYL
Could use a mention in NEWS.md |
@jiahao Good idea. Done. |
As discussed in JuliaLang/LinearAlgebra.jl#76, solver for the Lyapunov equation
AX + XA' +C = 0
and the Sylvester equation
AX + XB + C = 0
Function name and arguments is oriented at the Matlab neighbors.
lyapchol(A,B) for the cholesky factor of
A*X + X*A' + B*B' = 0
is still missing.