Mercurial > repos > public > sbplib_julia
changeset 1516:8d64f8981bb0 feature/grids/componentview
Remove comments and add todo
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Thu, 21 Mar 2024 07:42:19 +0100 |
parents | b2eaa1ad19c8 |
children | 7ee7df7d9b61 |
files | src/Grids/grid.jl test/Grids/grid_test.jl |
diffstat | 2 files changed, 1 insertions(+), 15 deletions(-) [+] |
line wrap: on
line diff
--- a/src/Grids/grid.jl Wed Mar 20 16:17:53 2024 +0100 +++ b/src/Grids/grid.jl Thu Mar 21 07:42:19 2024 +0100 @@ -67,20 +67,7 @@ # changing the return tyoe to a 0-dimensional array. That's where i gave up.) IndexStyle(::Type{<:ArrayComponentView{<:Any,<:Any,AT}}) where AT = IndexStyle(AT) -# TODO: Implement the remaining optional methods from the array interface -# setindex!(A, v, i::Int) -# setindex!(A, v, I::Vararg{Int, N}) -# iterate -# length(A) -# similar(A) -# similar(A, ::Type{S}) -# similar(A, dims::Dims) -# similar(A, ::Type{S}, dims::Dims) -# # Non-traditional indices -# axes(A) -# similar(A, ::Type{S}, inds) -# similar(T::Union{Type,Function}, inds) - +# TODO: Implement setindex!? # TODO: Implement a more general ComponentView that can handle non-AbstractArrays. """
--- a/test/Grids/grid_test.jl Wed Mar 20 16:17:53 2024 +0100 +++ b/test/Grids/grid_test.jl Thu Mar 21 07:42:19 2024 +0100 @@ -94,7 +94,6 @@ # REVIEW: I think we can reduce the index ranges. v = [@SMatrix[1 3; 2 4] .+ 100*i .+ 10*j for i ∈ 1:3, j∈ 1:4] - # switch to indexing in test? @test ArrayComponentView(v, (1, 1)) == [1 .+ 100*i .+ 10*j for i ∈ 1:3, j∈ 1:4] @test ArrayComponentView(v, (1, 2)) == [3 .+ 100*i .+ 10*j for i ∈ 1:3, j∈ 1:4] @test ArrayComponentView(v, (2, 1)) == [2 .+ 100*i .+ 10*j for i ∈ 1:3, j∈ 1:4]