You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sorry for the delay, finally getting into this. Given the new LazyArrays+BandedMatrices+InfiniteArrays framework my view on this has changed, in the sense that we should leverage LazyArrays as much as possible to enable ∞-dimensional usage. For example, the following works and is equivalent to an almost banded matrix:
julia> A =BandedMatrix(1=>Ones(∞), -1=>Fill(2,∞)) # Create Banded Matrix
∞×∞ BandedMatrix{Float64,ApplyArray{Float64,2,typeof(*),Tuple{Array{Float64,2},ApplyArray{Float64,2,typeof(vcat),Tuple{Ones{Float64,2,Tuple{Base.OneTo{Int64},OneToInf{Int64}}},Fill{Int64,2,Tuple{Base.OneTo{Int64},OneToInf{Int64}}}}}}},OneToInf{Int64}} with indices OneToInf()×OneToInf():0.01.0⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅…2.00.01.0⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅2.00.01.0⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅2.00.01.0⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅2.00.01.0⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅2.00.01.0⋅⋅⋅⋅⋅⋅⋅…⋅⋅⋅⋅⋅2.00.01.0⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅2.00.01.0⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅2.00.01.0⋅⋅⋅⋅⋮⋮⋮⋱
julia> B = [[1,2,3]; zeros(∞)] *Ones(1,∞) # Create Low Ranke Matrix
∞×∞ ApplyArray{Float64,2,typeof(*),Tuple{CachedArray{Float64,1,Array{Float64,1},Zeros{Float64,1,Tuple{OneToInf{Int64}}}},Ones{Float64,2,Tuple{Base.OneTo{Int64},OneToInf{Int64}}}}} with indices OneToInf()×OneToInf():1.01.01.01.01.01.01.01.01.01.01.01.01.01.0…2.02.02.02.02.02.02.02.02.02.02.02.02.02.03.03.03.03.03.03.03.03.03.03.03.03.03.03.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.0…0.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.0…0.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.00.0⋮⋮⋮⋱
julia>BroadcastArray(+,A,ApplyArray(triu,B,2)) # almost banded matrix
∞×∞ BroadcastArray{Float64,2,typeof(+),Tuple{BandedMatrix{Float64,ApplyArray{Float64,2,typeof(*),Tuple{Array{Float64,2},ApplyArray{Float64,2,typeof(vcat),Tuple{Ones{Float64,2,Tuple{Base.OneTo{Int64},OneToInf{Int64}}},Fill{Int64,2,Tuple{Base.OneTo{Int64},OneToInf{Int64}}}}}}},OneToInf{Int64}},ApplyArray{Float64,2,typeof(triu),Tuple{ApplyArray{Float64,2,typeof(*),Tuple{CachedArray{Float64,1,Array{Float64,1},Zeros{Float64,1,Tuple{OneToInf{Int64}}}},Ones{Float64,2,Tuple{Base.OneTo{Int64},OneToInf{Int64}}}}},Int64}}}} with indices OneToInf()×OneToInf():0.01.01.01.01.01.01.01.01.01.01.01.01.01.0…2.00.01.02.02.02.02.02.02.02.02.02.02.02.00.02.00.01.03.03.03.03.03.03.03.03.03.03.00.00.02.00.01.00.00.00.00.00.00.00.00.00.00.00.00.02.00.01.00.00.00.00.00.00.00.00.00.00.00.00.02.00.01.00.00.00.00.00.00.00.0…0.00.00.00.00.02.00.01.00.00.00.00.00.00.00.00.00.00.00.00.02.00.01.00.00.00.00.00.00.00.00.00.00.00.00.02.00.01.00.00.00.00.00.00.00.00.00.00.00.00.02.00.01.00.00.00.00.00.00.00.00.00.00.00.00.02.00.01.00.00.0…0.00.00.00.00.00.00.00.00.00.02.00.01.00.00.00.00.00.00.00.00.00.00.00.00.02.00.01.00.00.00.00.00.00.00.00.00.00.00.00.02.00.00.00.00.00.00.00.00.00.00.00.00.00.00.02.0⋮⋮⋮⋱
The one issue with the above construction is it doesn't link the bandwidth of A to the number of diagonals taken in B....
The text was updated successfully, but these errors were encountered:
Sorry for the delay, finally getting into this. Given the new LazyArrays+BandedMatrices+InfiniteArrays framework my view on this has changed, in the sense that we should leverage LazyArrays as much as possible to enable ∞-dimensional usage. For example, the following works and is equivalent to an almost banded matrix:
The one issue with the above construction is it doesn't link the bandwidth of
A
to the number of diagonals taken inB
....The text was updated successfully, but these errors were encountered: