Monte Carlo Integration Library 1.0
High-performance Monte Carlo methods for numerical integration and optimization
MCintegrator.hpp
Go to the documentation of this file.
1
8#ifndef MONTECARLO_1_MONTECARLO_INTEGRATOR_HPP
9#define MONTECARLO_1_MONTECARLO_INTEGRATOR_HPP
10
11#include "../domains/integration_domain.hpp"
12#include "../proposals/proposal.hpp"
13#include "../proposals/uniformProposal.hpp"
14#include "../mcmc/metropolisHastingsSampler.hpp"
15#include "../estimators/VolumeEstimatorMC.hpp"
16#include "../estimators/ISMeanEstimator.hpp"
17#include "../estimators/MCMeanEstimator.hpp"
18#include "../geometry.hpp"
19#include "integrator.hpp"
20
21#include <cstdint>
22#include <functional>
23
24namespace mc::integrators {
25
39template <std::size_t dim>
40class MontecarloIntegrator : public Integrator<dim> {
41public:
47
55 double OLDintegrate(const std::function<double(const mc::geom::Point<dim>&)>& f, int n_samples);
56
68 double integrate(const std::function<double(const mc::geom::Point<dim>&)>& f,
69 int n_samples,
70 const mc::proposals::Proposal<dim>& proposal,
71 std::uint32_t seed) override;
72};
73
74} // namespace mc::integrators
75
76#include "MCintegrator.tpp"
77
78#endif // MONTECARLO_1_MONTECARLO_INTEGRATOR_HPP
Abstract base class for N-dimensional integration domains.
N-dimensional point representation.
Definition geometry.hpp:32
Abstract base class for Monte Carlo integration in N dimensions.
Uniform-sampling Monte Carlo integrator for N-dimensional domains.
double integrate(const std::function< double(const mc::geom::Point< dim > &)> &f, int n_samples, const mc::proposals::Proposal< dim > &proposal, std::uint32_t seed) override
Compute the integral using uniform Monte Carlo sampling.
MontecarloIntegrator(const mc::domains::IntegrationDomain< dim > &d)
Construct a uniform Monte Carlo integrator for a domain.
double OLDintegrate(const std::function< double(const mc::geom::Point< dim > &)> &f, int n_samples)
Legacy integration routine (deprecated).
Abstract proposal distribution interface.
Definition proposal.hpp:29
Abstract base class for numerical integration in N-dimensional spaces.