-
-
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: selection of shift-and-invert mode in eigs #5776
Conversation
@@ -13,6 +13,7 @@ function eigs(A;nev::Integer=6, ncv::Integer=20, which::ASCIIString="LM", | |||
T = eltype(A) | |||
cmplx = T<:Complex | |||
bmat = "I" | |||
const arpack_which = "LM" # always looking for largest EV |
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.
How about naming this variable arpack_which_lm
?
This looks good. The build failure seems to be not relevant. |
One thing that might be problematic is that |
@acroy, that's a good point. Explicitly specifying |
But it would still be nice to have a |
@stevengj : I see. But for SA/LA we don't need sigma, right? Maybe we could use
|
…verse iteration. Docs updated.
I have updated my commit according to the discussion above. I am not sure about using |
I am not excited about |
@ViralBShah : How about using
This is strange. Last time only the |
I just figured out that |
New attempt: Now |
I find |
@stevengj @ViralBShah : I could live with both |
To help guide the |
And importantly, Jeff agreed. Using |
That's right; |
Ok, I will change it in the next commit. I just had the impression that |
It's better to use a value of the same type, or redesign the interface so that there's no need for a nothing value, but in a pinch, you can use |
Part of the lack of clarity here is what the type of |
It may be float or complex. I think the problem is that one wants |
|
I read the ARPACK manual and I don't see where exactly shift-and-inverse mode implies |
Hm, I meant to update this PR but didn't do this right. #6053 |
This changes the selection of shift-and-invert mode in eigs as discussed in JuliaLang/LinearAlgebra.jl#29:
sigma==0
andwhich="LM"
(default) the eigenvalues with largest magnitude are calculatedsigma==0
andwhich="SM"
inverse iteration is used to find eigenvalues with smallest magnitudesigma!=0
shift-and-invert is used to find eigenvalues closest to sigmaThe docs are updated and I have added a test for the case with
which="SM"
.(cc: @ViralBShah, @stevengj)