Skip to content
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

Add method to get the factors of a Factorization (and maybe AbstractLinearOperator too)? #47603

Open
oschulz opened this issue Nov 17, 2022 · 0 comments
Labels
linear algebra Linear algebra

Comments

@oschulz
Copy link
Contributor

oschulz commented Nov 17, 2022

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 #1412 - 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.

@dkarrasch dkarrasch added the linear algebra Linear algebra label Nov 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
linear algebra Linear algebra
Projects
None yet
Development

No branches or pull requests

2 participants