-
-
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
Complete eigs implementation #2956
Comments
What exactly does this mean? Are there any specific types other than matrices for this? |
Matlab's eigs and svds functions can work with arbitrary function handles that compute linear operators. |
@andrioni, what it means is that the user specifies a "black-box" function |
Right – @stevengj's explanation is much better than mine :-) |
Did anyone have a go at implementing the shifts part? I dearly need this. I will try and have a look myself, but I'm afraid I am far from an expert on ARPACK. |
Not yet. This is not too difficult - and I can try. Do you need |
What I really want is the |
The implementation goes into https://github.com/JuliaLang/julia/blob/master/base/linalg/arnoldi.jl All the wrappers are already provided in arpack.jl. Basically, look at your |
OK, I'll have a go at it over the next few days. I'll may need some guidance later on. |
|
What about the use of a general linear operator instead of a matrix? Basically, this requires passing a function |
@mcbal, this is accomplished by duck-typing (e.g. JuliaLinearAlgebra/IterativeSolvers.jl#2). The argument type of But this isn't really documented, and it is not as clean as it could be. |
Thank you very much for this Julia-esque solution! |
Is there any documentation anywhere as to what functions exactly need to be implemented for this to work? The following example currently does not work, whereas I think it should: import Base: *,size,transpose,issymmetric,eltype
type myLinearOperator
m::Int
end
*(op::myLinearOperator, x::Array{Float64}) = x
size(op::myLinearOperator) = (op.m,op.m)
transpose(op::myLinearOperator) = op
ctranspose(op::myLinearOperator) = op
issymmetric(op::myLinearOperator) = false
eltype(op::myLinearOperator) = Float64
myoperator = myLinearOperator(10)
myArray = Array{Float64}(ones(10))
eigs(myoperator,v0=myArray) The error I get from this is:
|
The
eigs
andsvds
implementation needs the following features to be completed:m < n
eig
andsvd
in cases where the user asks for all eigen/singular valuesIt has also been discussed in #1573 that this functionality should be merged into
eig
andsvd
. Once these are feature complete, we can unify the API.The text was updated successfully, but these errors were encountered: