Monte Carlo Integration Library 1.0
High-performance Monte Carlo methods for numerical integration and optimization
hypersphere.hpp
Go to the documentation of this file.
1
8#ifndef HYPERSPHERE_HPP
9#define HYPERSPHERE_HPP
10
12#include <utility>
13#include "../geometry.hpp"
14
15namespace mc::domains {
16
29template <size_t dim>
30class Hypersphere : public IntegrationDomain<dim>{
31public:
36 Hypersphere(double rad);
37
43
48 double getBoxVolume() const override;
49
55 bool isInside(const mc::geom::Point<dim> &point) const override;
56private:
58 double radius;
59};
60
61} // namespace mc::domains
62
63#include "hypersphere.tpp"
64
65#endif //HYPERSPHERE_HPP
N-dimensional ball (solid sphere).
double getBoxVolume() const override
Get the volume of the bounding hypercube.
mc::geom::Bounds< dim > getBounds() const override
Get the axis-aligned bounding box (hypercube).
Hypersphere(double rad)
Construct a hypersphere of given radius.
bool isInside(const mc::geom::Point< dim > &point) const override
Test if a point is inside the hypersphere.
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.