Monte Carlo Integration Library 1.0
High-performance Monte Carlo methods for numerical integration and optimization
integration_domain.hpp
Go to the documentation of this file.
1
10#ifndef MONTECARLO_1_INTEGRATION_DOMAIN_HPP
11#define MONTECARLO_1_INTEGRATION_DOMAIN_HPP
12
13#include <array>
14#include "../geometry.hpp"
15
16namespace mc::domains {
17
28template <size_t dim>
30public:
31
39 // returns the boundaries o f each dimension of the integration domain
40 virtual mc::geom::Bounds<dim> getBounds() const = 0;
41
49 // returns the volume of the integration domain
50 virtual double getBoxVolume() const = 0;
51
60 // returns true if the given point is inside the integration domain
61 virtual bool isInside(const mc::geom::Point<dim> &point) const = 0;
62
64 virtual ~IntegrationDomain() = default;
65
66};
67
68} // namespace mc::domains
69
70#endif //MONTECARLO_1_INTEGRATION_DOMAIN_HPP
Abstract base class for N-dimensional integration domains.
virtual bool isInside(const mc::geom::Point< dim > &point) const =0
Test whether a point lies inside the domain.
virtual mc::geom::Bounds< dim > getBounds() const =0
Get the axis-aligned bounding box of the domain.
virtual ~IntegrationDomain()=default
Virtual destructor for proper cleanup of derived classes.
virtual double getBoxVolume() const =0
Compute the volume of the bounding box.
N-dimensional axis-aligned bounding box.
Definition geometry.hpp:70
N-dimensional point representation.
Definition geometry.hpp:32