JuliaLang / JuliaLang/LinearAlgebra.jl
Add method to get the factors of a Factorization (and maybe AbstractLinearOperator too)?
- Dominant language
- Julia
- Stars
- 77
- Forks
- 65
- Avg merge
- 3d 23h
- Merged PRs (30d)
- 10
Description
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](https://github.com/JuliaLinearAlgebra/LinearMaps.jl), [LinearOperators.jl](https://github.com/JuliaSmoothOptimizers/LinearOperators.jl), [SciMLOperators.jl](https://github.com/SciML/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.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reviewing the existing LinearAlgebra.Factorization API and the linked JuliaLang/LinearAlgebra.jl#2 discussion. Determine whether the requested factor-access method belongs in LinearAlgebra and how it should interact with a possible AbstractLinearOperator design; done means an agreed API and corresponding implementation scope.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- data
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100