LinearAlgebra.jl
LinearAlgebra.jl copied to clipboard
Add method to get the factors of a Factorization (and maybe AbstractLinearOperator too)?
We have LinearAlgebra.Factorization, but I don't think we currently have a method to access the factors, e.g. a factorsof(X::Factorization)::Tuple or so.
This touches on JuliaLang/LinearAlgebra.jl#2 - it would be nice to eventually establish an abstract type for linear operators: We currently have LinearMaps.jl, LinearOperators.jl, SciMLOperators.jl, but they don't share a common super type. So currently, code that wants to support arrays and linear operators in general has to use argument type Any, which isn't so nice in scenarios where you need to be a bit more precise with dispatch. And a lot of existing code that mainly relies on multiplication but requires AbstractArray could in principle be used on linear operators, but currently can't due to lack of a common supertype that might be agreeable to adopt.
Such an AbstractLinearOperator type could live in LinearAlgebra or a separate package, and there could be a LinearOperatorLike = Union{AbstractLinearOperator, Factorization, AbstractMatrix} that code can dispatch on instead of Any, but it would profit from a generic method to get the factors out of a Factorization.
CC @simonbyrne, @timholy, @ChrisRackauckas, @dkarrasch, @Jutho, @dpo, @abelsiqueira who might be interested (and will probably have an opinion on) this.