Closed
Description
At the moment the following makes a lazy *
, but I think it should be left as a view
:
julia> S = LinearSpline{Float64}(0.0:3);
julia> S[:,2:end-1] # Lazy S * Project
QuasiArrays.ApplyQuasiArray{Float64,2,typeof(*),Tuple{Spline{1,Float64},BandedMatrices.BandedMatrix{Int64,FillArrays.Ones{Int64,2,Tuple{Base.OneTo{Int64},Base.OneTo{Int64}}},Base.OneTo{Int64}}}}(*, (Spline{1,Float64}([0.0, 1.0, 2.0, 3.0]), [0 0; 1 0; 0 1; 0 0]))
julia> view(S,:,2:size(S,2)-1) # proposal: returns this
QuasiArrays.SubQuasiArray{Float64,2,Spline{1,Float64},Tuple{Inclusion{Float64,IntervalSets.Interval{:closed,:closed,Float64}},UnitRange{Int64}},false}(Spline{1,Float64}([0.0, 1.0, 2.0, 3.0]), (Inclusion(0.0..3.0), 2:3), 0, 0)
I believe this is what you were asking for @jagot.
The steps to make it work are
- Support lazy multiplication with views
- Fix
getindex
for lazy multiplication of views - Lower
D*view(S,:,kr)
toview(D*S,:,kr)
Metadata
Metadata
Assignees
Labels
No labels