GridBoxMap
Another naive but still useful approach is to place the test points on an equidistant grid within a box. This approach removes randomness from the Monte-Carlo approach.
GAIO.GridBoxMap
— FunctionBoxMap(:grid, map, domain::Box{N}; n_points::NTuple{N} = ntuple(_->16, N)) -> SampledBoxMap
Construct a SampledBoxMap
that uses a grid of test points. The size of the grid is defined by n_points
, which is a tuple of length equal to the dimension of the domain.
Example
julia> n_points = (8, 8)
(8, 8)
julia> F = BoxMap(:grid, f, domain, n_points = n_points)
BoxMap over [0.0, 16.0) × [0.0, 14.0)
julia> p = plot!( p, F(B), color=RGBA(0.,1.,0.,0.5), lab="$(join(n_points, "x")) grid of test points", )
Plot{Plots.GRBackend() n=4}