comparison src/Grids/equidistant_grid.jl @ 1253:ff8f335c32d1 refactor/grids

Fix indexing with begin and end for EquidistantGrid
author Jonatan Werpers <jonatan@werpers.com>
date Wed, 22 Feb 2023 12:53:16 +0100
parents 40ca0af6e480
children 1989d432731a
comparison
equal deleted inserted replaced
1252:c150eabaf656 1253:ff8f335c32d1
9 Base.eltype(g::EquidistantGrid{T}) where T = T 9 Base.eltype(g::EquidistantGrid{T}) where T = T
10 Base.getindex(g::EquidistantGrid, i) = g.points[i] 10 Base.getindex(g::EquidistantGrid, i) = g.points[i]
11 Base.size(g::EquidistantGrid) = size(g.points) 11 Base.size(g::EquidistantGrid) = size(g.points)
12 Base.length(g::EquidistantGrid) = length(g.points) 12 Base.length(g::EquidistantGrid) = length(g.points)
13 Base.eachindex(g::EquidistantGrid) = eachindex(g.points) 13 Base.eachindex(g::EquidistantGrid) = eachindex(g.points)
14
15 Base.firstindex(g::EquidistantGrid) = firstindex(g.points)
16 Base.lastindex(g::EquidistantGrid) = lastindex(g.points)
14 17
15 # TODO: Make sure collect works! 18 # TODO: Make sure collect works!
16 19
17 20
18 """ 21 """