-
-
Notifications
You must be signed in to change notification settings - Fork 74
Define indexing #8
Comments
Indexing should also automatically give |
Can you explain that comprehensively? Do you mean to add operators to form a sort of composed PDE operator as in LinearMaps? |
Lazy composed PDE operators is another thing that's needed, but that should be a separate issue. Just simple |
Some indexing support has also been pushed here. |
well there you go julia> A = LinearOperator{Float64}(2,2,8);
julia> m = ones(8,8);
julia> res = A+m
LinearMaps.LinearCombination{Float64,Tuple{PDEOperators.LinearOperator{Float64,StaticArrays.SVector{3,Float64}},LinearMaps.WrappedMap{Float64,Array{Float64,2}}},Tuple{Float64,Float64}}((PDEOperators.LinearOperator{Float64,StaticArrays.SVector{3,Float64}}(2,2,8,3,[1.0,-2.0,1.0],3,4),LinearMaps.WrappedMap{Float64,Array{Float64,2}}([1.0 1.0 … 1.0 1.0; 1.0 1.0 … 1.0 1.0; … ; 1.0 1.0 … 1.0 1.0; 1.0 1.0 … 1.0 1.0],true,true,true,false)),(1.0,1.0))
julia> full(res)
8×8 Array{Float64,2}:
-1.0 2.0 1.0 1.0 1.0 1.0 1.0 1.0
2.0 -1.0 2.0 1.0 1.0 1.0 1.0 1.0
1.0 2.0 -1.0 2.0 1.0 1.0 1.0 1.0
1.0 1.0 2.0 -1.0 2.0 1.0 1.0 1.0
1.0 1.0 1.0 2.0 -1.0 2.0 1.0 1.0
1.0 1.0 1.0 1.0 2.0 -1.0 2.0 1.0
1.0 1.0 1.0 1.0 1.0 2.0 -1.0 2.0
1.0 1.0 1.0 1.0 1.0 1.0 2.0 -1.0 This "just works" property is too good. |
You should define
getindex
operations so that way indexing works.The text was updated successfully, but these errors were encountered: