Mercurial > repos > public > sbplib_julia
comparison src/Grids/equidistant_grid.jl @ 1868:81559cb7b11c feature/grids/manifolds
Merge default
| author | Jonatan Werpers <jonatan@werpers.com> |
|---|---|
| date | Thu, 23 Jan 2025 23:22:11 +0100 |
| parents | f2b32da29b73 244311761969 |
| children | edee7d677efb |
comparison
equal
deleted
inserted
replaced
| 1867:de4b4f2aee4f | 1868:81559cb7b11c |
|---|---|
| 13 struct EquidistantGrid{T,R<:AbstractRange{T}} <: Grid{T,1} | 13 struct EquidistantGrid{T,R<:AbstractRange{T}} <: Grid{T,1} |
| 14 points::R | 14 points::R |
| 15 end | 15 end |
| 16 | 16 |
| 17 # Indexing interface | 17 # Indexing interface |
| 18 Base.getindex(g::EquidistantGrid, i) = g.points[i] | 18 Base.getindex(g::EquidistantGrid, i::Int) = g.points[i] |
| 19 Base.eachindex(g::EquidistantGrid) = eachindex(g.points) | 19 Base.eachindex(g::EquidistantGrid) = eachindex(g.points) |
| 20 Base.firstindex(g::EquidistantGrid) = firstindex(g.points) | 20 Base.firstindex(g::EquidistantGrid) = firstindex(g.points) |
| 21 Base.lastindex(g::EquidistantGrid) = lastindex(g.points) | 21 Base.lastindex(g::EquidistantGrid) = lastindex(g.points) |
| 22 | 22 |
| 23 Base.axes(g::EquidistantGrid, d) = axes(g.points, d) | 23 Base.axes(g::EquidistantGrid, d) = axes(g.points, d) |
