Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Monte Carlo integration methods #24

Open
mikeingold opened this issue Mar 3, 2024 · 0 comments
Open

Implement Monte Carlo integration methods #24

mikeingold opened this issue Mar 3, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@mikeingold
Copy link
Collaborator

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
@mikeingold mikeingold added enhancement New feature or request help wanted Extra attention is needed labels Mar 3, 2024
@mikeingold mikeingold pinned this issue Apr 13, 2024
@mikeingold mikeingold changed the title TODO Implement Monte Carlo integration methods Implement Monte Carlo integration methods Apr 14, 2024
@mikeingold mikeingold removed the help wanted Extra attention is needed label Sep 9, 2024
@mikeingold mikeingold unpinned this issue Sep 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant