Monte Carlo Integration Library 1.0
High-performance Monte Carlo methods for numerical integration and optimization
hyperrectangle.hpp
Go to the documentation of this file.
1
9#ifndef MONTECARLO_1_HYPERRECTANGLE_HPP
10#define MONTECARLO_1_HYPERRECTANGLE_HPP
11
13#include <utility>
14#include "../geometry.hpp"
15
16namespace mc::domains {
17
28template <size_t dim>
30public:
36 HyperRectangle(std::array<double, dim> &dims);
37
43
48 double getBoxVolume() const override;
49
55 bool isInside(const mc::geom::Point<dim> &point) const override;
56private:
58 std::array<double, dim> dimensions;
59};
60
61} // namespace mc::domains
62
63#include "hyperrectangle.tpp"
64
65#endif //MONTECARLO_1_HYPERRECTANGLE_HPP
Axis-aligned hyperrectangular domain.
double getBoxVolume() const override
Compute the volume of the hyperrectangle.
bool isInside(const mc::geom::Point< dim > &point) const override
Test if a point is inside the hyperrectangle.
mc::geom::Bounds< dim > getBounds() const override
Get the axis-aligned bounding box (coincides with the domain).
HyperRectangle(std::array< double, dim > &dims)
Construct a hyperrectangle from dimension extents.
Abstract base class for N-dimensional integration domains.
N-dimensional axis-aligned bounding box.
Definition geometry.hpp:70
N-dimensional point representation.
Definition geometry.hpp:32
Abstract interface for N-dimensional integration domains.