Mercurial > repos > public > sbplib_julia
changeset 1389:d2219cc8316b bugfix/grids/complete_interface_impl
Add `firstindex(g,d)` and `lastindex(g,d)` for `EquidistantGrid`
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Tue, 15 Aug 2023 22:38:48 +0200 |
parents | c0208286234e |
children | 47931bef8471 |
files | src/Grids/equidistant_grid.jl |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/Grids/equidistant_grid.jl Tue Aug 15 22:11:20 2023 +0200 +++ b/src/Grids/equidistant_grid.jl Tue Aug 15 22:38:48 2023 +0200 @@ -20,6 +20,9 @@ Base.firstindex(g::EquidistantGrid) = firstindex(g.points) Base.lastindex(g::EquidistantGrid) = lastindex(g.points) +Base.firstindex(g::EquidistantGrid, d) = firstindex(g) +Base.lastindex(g::EquidistantGrid, d) = lastindex(g) + # Iteration interface Base.iterate(g::EquidistantGrid) = iterate(g.points) Base.iterate(g::EquidistantGrid, state) = iterate(g.points, state)