Mercurial > repos > public > sbplib_julia
comparison src/Grids/equidistant_grid.jl @ 1437:e3a80ef08d09
Implement size(g,d) for EquidistantGrid and TensorGrid
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Wed, 22 Nov 2023 17:34:35 +0100 |
parents | adbdbf1c3480 |
children | 05eb8ba149e2 |
comparison
equal
deleted
inserted
replaced
1421:69c9e6eae686 | 1437:e3a80ef08d09 |
---|---|
27 Base.iterate(g::EquidistantGrid, state) = iterate(g.points, state) | 27 Base.iterate(g::EquidistantGrid, state) = iterate(g.points, state) |
28 | 28 |
29 Base.IteratorSize(::Type{<:EquidistantGrid}) = Base.HasShape{1}() | 29 Base.IteratorSize(::Type{<:EquidistantGrid}) = Base.HasShape{1}() |
30 Base.length(g::EquidistantGrid) = length(g.points) | 30 Base.length(g::EquidistantGrid) = length(g.points) |
31 Base.size(g::EquidistantGrid) = size(g.points) | 31 Base.size(g::EquidistantGrid) = size(g.points) |
32 Base.size(g::EquidistantGrid, d) = size(g.points)[d] | |
32 | 33 |
33 | 34 |
34 """ | 35 """ |
35 spacing(grid::EquidistantGrid) | 36 spacing(grid::EquidistantGrid) |
36 | 37 |