Mercurial > repos > public > sbplib_julia
comparison src/Grids/grid.jl @ 1514:b6f6425e34ac refactor/component_type
Merge default
| author | Jonatan Werpers <jonatan@werpers.com> |
|---|---|
| date | Thu, 21 Mar 2024 15:38:30 +0100 |
| parents | 7476877c0b0e d7bc11053951 |
| children | 0cd6cf62af93 |
comparison
equal
deleted
inserted
replaced
| 1512:7476877c0b0e | 1514:b6f6425e34ac |
|---|---|
| 25 Base.getindex(g::Grid, I::CartesianIndex) = g[Tuple(I)...] | 25 Base.getindex(g::Grid, I::CartesianIndex) = g[Tuple(I)...] |
| 26 | 26 |
| 27 """ | 27 """ |
| 28 coordinate_size(g) | 28 coordinate_size(g) |
| 29 | 29 |
| 30 The lenght of the coordinate vector of `Grid` `g`. | 30 The length of the coordinate vector of `Grid` `g`. |
| 31 """ | 31 """ |
| 32 coordinate_size(::Type{<:Grid{T}}) where T = _ncomponents(T) | 32 coordinate_size(::Type{<:Grid{T}}) where T = _ncomponents(T) |
| 33 coordinate_size(g::Grid) = coordinate_size(typeof(g)) # TBD: Name of this function?! | 33 coordinate_size(g::Grid) = coordinate_size(typeof(g)) # TBD: Name of this function?! |
| 34 | 34 |
| 35 """ | 35 """ |
