|
Monte Carlo Integration Library 1.0
High-performance Monte Carlo methods for numerical integration and optimization
|
N-dimensional ball (solid sphere). More...
#include <hypersphere.hpp>
Public Member Functions | |
| Hypersphere (double rad) | |
| Construct a hypersphere of given radius. | |
| mc::geom::Bounds< dim > | getBounds () const override |
| Get the axis-aligned bounding box (hypercube). | |
| double | getBoxVolume () const override |
| Get the volume of the bounding hypercube. | |
| bool | isInside (const mc::geom::Point< dim > &point) const override |
| Test if a point is inside the hypersphere. | |
Public Member Functions inherited from mc::domains::IntegrationDomain< dim > | |
| virtual | ~IntegrationDomain ()=default |
| Virtual destructor for proper cleanup of derived classes. | |
N-dimensional ball (solid sphere).
| dim | Dimensionality (e.g., 2 for disk, 3 for ball, N for hypersphere). |
Represents a closed ball of specified radius centered at the origin: B = {x ∈ ℝⁿ : ||x|| ≤ r}
Uses the closed-form volume formula: V = (π^(n/2) / Γ(n/2 + 1)) * r^n
Bounding box is a hypercube [-r, r]ⁿ.
Definition at line 30 of file hypersphere.hpp.
| mc::domains::Hypersphere< dim >::Hypersphere | ( | double | rad | ) |
Construct a hypersphere of given radius.
| rad | Radius of the sphere (must be > 0). |
|
overridevirtual |
Get the axis-aligned bounding box (hypercube).
Implements mc::domains::IntegrationDomain< dim >.
|
overridevirtual |
Get the volume of the bounding hypercube.
Implements mc::domains::IntegrationDomain< dim >.
|
overridevirtual |
Test if a point is inside the hypersphere.
| point | Point to test. |
Implements mc::domains::IntegrationDomain< dim >.