-
Notifications
You must be signed in to change notification settings - Fork 5
Open
Labels
enhancementNew feature or requestNew feature or request
Description
It should be relatively straight-forward to implement Monte Carlo integration methods since Meshes.jl provides built-in sampling algorithms. I imagine it would work something like:
using Statistics: mean
struct MonteCarlo{T} <: IntegrationAlgorithm where {T<:Meshes.ContinuousSamplingMethod}
sampler::T
end
function _integral(f, geometry, settings::MonteCarlo)
test_points = sample(geometry, settings.sampler)
mean(f, test_points) * measure(geometry)
end
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request