view AbstractGrid.jl @ 391:5b09c16d669d default_perf_test

Close branch
author Jonatan Werpers <jonatan@werpers.com>
date Thu, 01 Oct 2020 08:28:28 +0200
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