Mercurial > repos > public > sbplib_julia
comparison AbstractGrid.jl @ 51:614b56a017b9
Split grid.jl into AbstractGrid.jl and EquidistantGrid.jl
author | Vidar Stiernström <vidar.stiernstrom@it.uu.se> |
---|---|
date | Fri, 11 Jan 2019 11:55:13 +0100 |
parents | |
children | 631eb9b35d72 |
comparison
equal
deleted
inserted
replaced
46:50c6c252d954 | 51:614b56a017b9 |
---|---|
1 abstract type AbstractGrid end | |
2 | |
3 function numberOfDimensions(grid::AbstractGrid) | |
4 error("Not implemented for abstact type AbstractGrid") | |
5 end | |
6 | |
7 function numberOfPoints(grid::AbstractGrid) | |
8 error("Not implemented for abstact type AbstractGrid") | |
9 end | |
10 | |
11 function points(grid::AbstractGrid) | |
12 error("Not implemented for abstact type AbstractGrid") | |
13 end | |
14 | |
15 # Evaluate function f on the grid g | |
16 function evalOn(g::AbstractGrid, f::Function) | |
17 F(x) = f(x...) | |
18 return F.(points(g)) | |
19 end |