Mercurial > repos > public > sbplib_julia
comparison src/Grids/AbstractGrid.jl @ 1114:fc57804c9bf4 feature/grids
Add function dims
author | Vidar Stiernström <vidar.stiernstrom@it.uu.se> |
---|---|
date | Fri, 15 Jul 2022 09:38:08 +0200 |
parents | c16abc564b82 |
children | 6530fceef37c |
comparison
equal
deleted
inserted
replaced
1113:4e4c5011140d | 1114:fc57804c9bf4 |
---|---|
20 function evalOn(g::AbstractGrid, f::Function) | 20 function evalOn(g::AbstractGrid, f::Function) |
21 F(x) = f(x...) | 21 F(x) = f(x...) |
22 return F.(points(g)) | 22 return F.(points(g)) |
23 end | 23 end |
24 export evalOn | 24 export evalOn |
25 | |
26 | |
27 """ | |
28 dims(g::AbstractGrid) | |
29 | |
30 A range containing the dimensions of the grid | |
31 """ | |
32 dims(grid::AbstractGrid) = 1:dimension(grid) | |
33 export dims |