JuliaLinearAlgebra / ArnoldiMethod.jl

The Arnoldi Method with Krylov-Schur restart, natively in Julia.

Home Page:https://julialinearalgebra.github.io/ArnoldiMethod.jl/dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Overly strict type constraint in partialeigen

jpfairbanks opened this issue · comments

commented

In this line I think the type constraint to too tight. We only need some size and eltype

https://github.com/haampie/ArnoldiMethod.jl/blob/c1e12341cb8a2452a4a08ce90f4e0868e2a82050/src/eigvals.jl#L39

eigenvalues(A::AbstractMatrix{T}, tol = eps(real(T)))

A doesn't need to be an AbstractMatrix. This impacts LightGraphs because we have linear operators that are implicitly defined in terms of other linear operators which are represented with a type that is not a subtype of AbstractMatrix.

This is not an exported function, and it is being called on the R matrix in the partial schur decomposition. But I agree that a helper function that just computes eigenvalues would be useful. That would be something like partialeigenvalues(A, ...) = partialschur(A, ...)[1].eigenvalues.