diff src/Grids/equidistant_grid.jl @ 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 4684c7f1c4cb
children adbdbf1c3480
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)