-
Notifications
You must be signed in to change notification settings - Fork 18
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
Missing function name eigs #69
Comments
Hey, yes, I should still write the utility functions. Right now the API is more or less similar to ARPACK (a function for matrix -> schur and one that does some post-processing with partial schur -> eigen). The |
Here is the version that is working for me in LG. function eigs(A; kwargs...)
schr =partialschur(A; kwargs...)
vals, vectors = partialeigen(schr[1])
reved = (kwargs[:which] == LR() || kwargs[:which] == LM())
k = get(kwargs, :nev, length(vals))
k = min(k, length(vals))
perm = 1:k
if vals[1] isa(Real)
perm = sortperm(vals, rev=reved)
perm = perm[1:k]
end
λ = vals[perm]
Q = vectors[:, perm]
return λ, Q
end
I can make a PR. I don't know about the other corner cases. These work for my needs which are mostly limited to Adjacency and Laplacian Matrices of graphs. |
So, the order of the eigenvalues has been fixed now when calling In the end |
Hello! Is the For me, having a |
Hi @haampie, is there a reason this package doesn't export a function
eigs
satisfying the old interface?it looks like the correct way to use it is
Is there something else to it?
The text was updated successfully, but these errors were encountered: