ParaMonte Fortran 2.0.0
Parallel Monte Carlo and Machine Learning Library
See the latest version documentation. |
This module contains classes and procedures for setting up and computing the properties of the hyper-ellipsoids in arbitrary dimensions. More...
Data Types | |
interface | getCountMemberEll |
Generate and return the number of points that are members (i.e., inside) of the specified \(\ndim\)-dimensional ellipsoid. More... | |
interface | getLogVolEll |
Generate and return the natural logarithm of the volume of an \(\ndim\)-dimensional ellipsoid. More... | |
interface | getLogVolUnitBall |
Generate and return the natural logarithm of the volume of an \(\ndim\)-dimensional ball of unit-radius. More... | |
interface | isMemberEll |
Generate and return .true. if and only if the input point is a member (i.e., inside) of the specified \(\ndim\)-dimensional ellipsoid.More... | |
interface | setLogVolUnitBall |
Return the natural logarithm of the volume of an \(\ndim\)-dimensional ball of unit-radius. More... | |
Variables | |
character(*, SK), parameter | MODULE_NAME = "@pm_ellipsoid" |
This module contains classes and procedures for setting up and computing the properties of the hyper-ellipsoids in arbitrary dimensions.
An ellipsoid in Euclidean geomtery \(\ell\) is defined by its representative Gramian matrix \(\Sigma_\ell\), containing all points in \(\mathbb{R}^\ndim\) that satisfy,
\begin{equation} \large (X - \mu_\ell)^T ~ \Sigma_\ell^{-1} ~ (X - \mu_\ell) \leq 1 ~, \end{equation}
where \(\mu_\ell\) represents the center of the ellipsoid, \((X - \mu_\ell)^T\) is the transpose of the vector \((X - \mu_\ell)\), and \(\Sigma_\ell^{-1}\) is the inverse of the matrix \(\Sigma_\ell\).
The volume of this ellipsoid is given by,
\begin{equation} \large V(\ell) = V_\ndim \sqrt{\left| \Sigma_\ell \right|} ~, \end{equation}
where \(\left|\Sigma_\ell\right|\) is the determinant of \(\Sigma_\ell\) and,
\begin{equation} \large V_\ndim = \frac{\pi^{\ndim / 2}}{\up\Gamma(1 + \ndim / 2)} = \begin{cases} \frac{1}{(\ndim/2)!} \pi^{\ndim/2} & \text{if $\ndim$ is even} \\\\ 2^\ndim \frac{1}{\ndim!} \big( \frac{\ndim-1}{2} \big)! ~ \pi^{(\ndim-1)/2} & \text{if $\ndim$ is odd} \end{cases} \end{equation}
is the volume of an \(\ndim\)-ball (that is, a unit-radius \(\ndim\)-dimensional hyper-ball).
It is readily seen that the corresponding unit-volume ellipsoid \(\widehat\ell\) has the representative Gramian matrix,
\begin{equation} \large \Sigma_{\widehat\ell} = V_\ell^{-2/\ndim} ~ \Sigma_\ell ~. \end{equation}
More generally, to scale an ellipsoid \(\ell\) by some factor \(\alpha\) along each coordinate axis, it suffices to be used the new scaled ellipsoid \(\ell^*\) with the representative Gramian matrix,
\begin{equation} \large \Sigma_{\ell^*} = \alpha^2 ~ \Sigma_\ell ~, \end{equation}
in which case, the volume of \(\ell^*\) becomes,
\begin{equation} \large V_{\ell^*} = \alpha^\ndim ~ V_\ell ~. \end{equation}
The surface area of an \(\ndim\)-ball
The surface area \(S\) of an \(\ndim\)-dimensional ball of unit-radius is related to its volume \(V\) as,
\begin{equation} S_\ndim = \ndim \times V_\ndim ~, \end{equation}
where the natural logarithm of \(V\) is returned by getLogVolUnitBall and setLogVolUnitBall.
getLogVolUnion()
in this module needs cleanup and merging with this module.
Final Remarks ⛓
If you believe this algorithm or its documentation can be improved, we appreciate your contribution and help to edit this page's documentation and source file on GitHub.
For details on the naming abbreviations, see this page.
For details on the naming conventions, see this page.
This software is distributed under the MIT license with additional terms outlined below.
This software is available to the public under a highly permissive license.
Help us justify its continued development and maintenance by acknowledging its benefit to society, distributing it, and contributing to it.
character(*, SK), parameter pm_ellipsoid::MODULE_NAME = "@pm_ellipsoid" |
Definition at line 111 of file pm_ellipsoid.F90.