PointDiscretizedBoxMap

A generalization of MonteCarloBoxMap and GridBoxMap can be defined as follows:

  1. we provide a "global" set of test points within the unit cube $[-1,1]^d$.
  2. For each box Box(c,r), we rescale the global test points to lie within the box by calculating c .+ r .* p for each global test point p.
GAIO.PointDiscretizedBoxMapFunction
BoxMap(:pointdiscretized, map, domain, points) -> SampledBoxMap

Construct a SampledBoxMap that uses the iterator points as test points. points must be an array or iterator of test points within the unit cube [-1,1]^N.

source

Example

julia> using StaticArrays
       # create a map that tests the vertices of a box
julia> global_test_points = SVector{2,Float64}[ (1, 1), (1, -1), (-1, 1), (-1, -1) ]4-element Vector{SVector{2, Float64}}: [1.0, 1.0] [1.0, -1.0] [-1.0, 1.0] [-1.0, -1.0]
julia> F = BoxMap(:pointdiscretized, f, domain, global_test_points)SampledBoxMap with 4 sample points
julia> p = plot!( p, F(B), color=RGBA(1.,0.,0.,0.5), lab="Images of test points along the vertices", )Plot{Plots.GRBackend() n=4}

Point Discretized BoxMap