MonteCarloBoxMap

The simplest technique for discretization is a Monte-Carlo approach: choose a random set of points (sampled according to a uniform distribution) within a box and record which boxes are hit by the point map.

GAIO.MonteCarloBoxMapFunction
BoxMap(:montecarlo, map, domain::Box{N}; n_points=16*N) -> SampledBoxMap

Construct a SampledBoxMap that uses n_points Monte-Carlo test points.

source

Example

julia> n_points = 128128
julia> F = BoxMap(:montecarlo, f, domain, n_points = n_points)BoxMap over [0.0, 16.0) × [0.0, 14.0)
julia> p = plot!( p, F(B), color=RGBA(1.,0.,0.,0.5), lab="$n_points MonteCarlo test points", )Plot{Plots.GRBackend() n=4}

MonteCarlo BoxMap