view Grids/src/AbstractGrid.jl @ 218:03375aa30edd package_refactor

Add Tests and exports to RegionIndices
author Jonatan Werpers <jonatan@werpers.com>
date Wed, 26 Jun 2019 12:57:20 +0200
parents aa17d4d9d09e
children b3506cfbb9d8
line wrap: on
line source

"""
     AbstractGrid

Should implement
    dimension(grid::AbstractGrid)
    points(grid::AbstractGrid)

"""
abstract type AbstractGrid end

function dimension end
function points end
export dimension, points

"""
    evalOn(g::AbstractGrid, f::Function)

Evaluate function f on the grid g
"""
function evalOn(g::AbstractGrid, f::Function)
    F(x) = f(x...)
    return F.(points(g))
end