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
BoxMap(:pointdiscretized, :simd, map, domain, points) -> CPUSampledBoxMap

Construct a CPUSampledBoxMap that uses the iterator points as test points. points must have eltype SVector{N, SIMD.Vec{S,T}} and be within the unit cube [-1,1]^N.

source
BoxMap(:pointdiscretized, :gpu, map, domain::Box{N}, points) -> GPUSampledBoxMap

Construct a GPUSampledBoxMap that uses the Vector points as test points. points must be a VECTOR of test points within the unit cube [-1,1]^N.

Requires a CUDA-capable gpu.

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