Mercurial > repos > public > sbplib_julia
view AbstractGrid.jl @ 56:27a8d3021a1c cell_based_test
Convert apply functions to cell-based
author | Ylva Rydin <ylva.rydin@telia.com> |
---|---|
date | Tue, 15 Jan 2019 12:26:06 +0100 |
parents | 614b56a017b9 |
children | 631eb9b35d72 |
line wrap: on
line source
abstract type AbstractGrid end function numberOfDimensions(grid::AbstractGrid) error("Not implemented for abstact type AbstractGrid") end function numberOfPoints(grid::AbstractGrid) error("Not implemented for abstact type AbstractGrid") end function points(grid::AbstractGrid) error("Not implemented for abstact type AbstractGrid") end # Evaluate function f on the grid g function evalOn(g::AbstractGrid, f::Function) F(x) = f(x...) return F.(points(g)) end