Mercurial > repos > public > sbplib_julia
diff src/Grids/equidistant_grid.jl @ 1779:2a8a2b52a112 feature/grids/manifolds
Refactor Interval to its own type. This allows the user better control of the coordinate type of 1d grids
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Mon, 16 Sep 2024 08:33:43 +0200 |
parents | 03894fd7b132 |
children | f2b32da29b73 |
line wrap: on
line diff
--- a/src/Grids/equidistant_grid.jl Sun Sep 15 23:27:04 2024 +0200 +++ b/src/Grids/equidistant_grid.jl Mon Sep 16 08:33:43 2024 +0200 @@ -151,9 +151,8 @@ return EquidistantGrid(range(limit_lower, limit_upper, length=size)) # TBD: Should it use LinRange instead? end - -equidistant_grid(hb::HyperBox, dims::Vararg{Int}) = equidistant_grid(hb.a, hb.b, dims...) -# TODO: One dimensional grids shouldn't have vector eltype right?, Change here or in HyperBox? +equidistant_grid(d::Interval, size::Int) = equidistant_grid(limits(d)..., size) +equidistant_grid(hb::HyperBox, dims::Vararg{Int}) = equidistant_grid(limits(hb)..., dims...) function equidistant_grid(c::Chart, dims::Vararg{Int}) lg = equidistant_grid(parameterspace(c), dims...)