view AbstractGrid.jl @ 121:3560f54e3eb3 cell_based_test

Change implementation of getrange to be more julia(???), mostly as an experiment to see if it breakes stuff
author Jonatan Werpers <jonatan@werpers.com>
date Sun, 10 Feb 2019 19:16:14 +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