view Grids/src/AbstractGrid.jl @ 325:41c3c25e4e3b

LazyTensors: Simplify the LazyElementwiseOperation type by restricting it and introducing a LazyConstantArray to handle scalars.
author Jonatan Werpers <jonatan@werpers.com>
date Thu, 24 Sep 2020 22:31:04 +0200
parents b3506cfbb9d8
children
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
export evalOn