Mercurial > repos > public > sbplib_julia
comparison src/Grids/grid.jl @ 1256:3fc78ad26d03 refactor/grids
Add notes and todos about interface implementations for grids
| author | Jonatan Werpers <jonatan@werpers.com> |
|---|---|
| date | Wed, 22 Feb 2023 22:38:54 +0100 |
| parents | eb19cd128157 |
| children | 198ccda331a6 |
comparison
equal
deleted
inserted
replaced
| 1255:1989d432731a | 1256:3fc78ad26d03 |
|---|---|
| 5 | 5 |
| 6 Should implement | 6 Should implement |
| 7 # TBD: | 7 # TBD: |
| 8 """ | 8 """ |
| 9 #TBD: Should it be an AbstractArray? See notes in grid_refactor.md | 9 #TBD: Should it be an AbstractArray? See notes in grid_refactor.md |
| 10 # TODO: Document that grids should implement the interfaces for iteration and indexing. | |
| 10 abstract type Grid{T,D,RD} end | 11 abstract type Grid{T,D,RD} end |
| 11 | 12 |
| 12 | 13 |
| 13 Base.ndims(::Grid{T,D,RD}) where {T,D,RD} = D # nidms borde nog vara antalet index som används för att indexera nätet. Snarare än vilken dimension nätet har (tänk ostrukturerat) | 14 Base.ndims(::Grid{T,D,RD}) where {T,D,RD} = D # nidms borde nog vara antalet index som används för att indexera nätet. Snarare än vilken dimension nätet har (tänk ostrukturerat) |
| 14 nrangedims(::Grid{T,D,RD}) where {T,D,RD} = RD | 15 nrangedims(::Grid{T,D,RD}) where {T,D,RD} = RD |
