I am developing a new package for Kronecker product matrices
A ⊗ B ⊗ ....
I want to support efficient factorizations for these type of matrices and want to use the types in LinearAlgebra.jl
Here follows the type definition of SVD in LinearAlgebra/src/svd.jl
struct SVD{T,Tr,M<:AbstractArray{T}} <: Factorization{T}
U::M
S::Vector{Tr}
Vt::M
function SVD{T,Tr,M}(U, S, Vt) where {T,Tr,M<:AbstractArray{T}}
require_one_based_indexing(U, S, Vt)
new{T,Tr,M}(U, S, Vt)
end
end
Storage of the singular values in a standard Vector is sub-optimal for an svd of Kronecker products. Can we make the following change?
S::Vector{Tr}
to
S::AbstractVector{Tr}