ParaMonte Fortran 2.0.0
Parallel Monte Carlo and Machine Learning Library
See the latest version documentation. |
Return a collection of random vectors of size ndim
from the ndim
-dimensional Multiple MultiVariate Uniform Ellipsoidal (MMVUE) distribution, with the specified input mean(1:ndim, 1:nell)
and optionally the specified subset
of the Cholesky Factorization of the Gramian matrices of the MMVUE distribution.
More...
Return a collection of random vectors of size ndim
from the ndim
-dimensional Multiple MultiVariate Uniform Ellipsoidal (MMVUE) distribution, with the specified input mean(1:ndim, 1:nell)
and optionally the specified subset
of the Cholesky Factorization of the Gramian matrices of the MMVUE distribution.
Here,
ndim
represents the number of dimensions of the domain of the distribution (that is, the number of dimensions of the ellipsoids), nsam
represents the number of randomly sampled points from the set of ellipsoids specified by the input arguments, nell
represents the number of ellipsoids in the distirbution. [in,out] | rng | : The input/output scalar that can be an object of,
|
[out] | rand | : The output contiguous vector of shape (1:ndim) (or matrix of shape (1:ndim, 1:nsam) ) ofcontaining the ( nsam ) random output vector(s). |
[out] | mahalSq | : The output vector of shape (1:nell) (or matrix of shape (1:nell, 1:nsam) ) of the same type and kind as the output rand , containing the squared Mahalanobis distance(s) of individual randomly sampled vector(s rand(:, isam) ) from the centers of the specified ellipsoids in the distribution via the input argument mean(1:ndim, 1:nell) .
|
[out] | invmul | : The output scalar (or vector of shape (1:nsam) ) of the same type and kind as the output rand , (each element of) which represents the inverse of the number of ellipsoids within which the corresponding random vector rand(1:ndim) (or rand(1:ndim, isam) ) falls. |
[out] | membership | : The output scalar (or vector of shape (1:nsam) ) of type integer of default kind IK, (the isam element of) which contains the ID of the ellipsoid from which (the isam ) sampled point has been generated. |
[in] | mean | : The input contiguous matrix of shape (1:ndim, 1:nell) , of the same type and kind as the output rand , representing the centers of the ellipsoids in the distribution. |
[in] | chol | : The input contiguous array of shape (1:ndim, 1:ndim, 1:nell) whose specified triangular subset contains the Cholesky Factorization of the Gramian matrix of the MMVUE distribution.(optional, the default is the Identity matrix of rank ndim . It must be present if and only if the input argument subset and invGram are also present.) |
[in] | subset | : The input scalar constant that can be any of the following:
(optional. It must be present if and only if the input argument chol is present.) |
[in] | invGram | : The input array of shape (1:ndim, 1:ndim, 1:nell) of the same type and kind as the output argument rand , containing the collection of square matrices of full inverse representative Gramian matrix of the \(\ndim\)-dimensional ellipsoids in the distribution.This argument is needed to determine the membership of the output random vector(s) in the ellipsoids. (optional. It must be present if and only if the input argument chol is present.) |
[in] | cumPropVol | : The input vector of shape (0:nell) of the same type and kind as the output argument rand , the subset (1:nell) contains the cumulative proportions of the multiplicative traces of the input Cholesky factors chol of the ellipsoids in the distribution.This argument can be computed as, real(typeof(rand)) :: cumPropVol(size(mean, 2))
do iell = 1, size(mean, 2, IK)
cumPropVol(iell) = getMatMulTraceLog(chol(:, :, iell))
end do
Return the cumulative sum of the proportions of the exponential of the input array,... Definition: pm_mathCumPropExp.F90:569 Generate and return the natural logarithm of the multiplicative trace of an input square matrix of ty... Definition: pm_matrixTrace.F90:2769 This module contains the procedures and interfaces for computing the cumulative sum of the exponentia... Definition: pm_mathCumPropExp.F90:47 This module contains procedures and generic interfaces for computing the additive or multiplicative t... Definition: pm_matrixTrace.F90:69 (optional. It must be present if and only if the input arguments chol and invGram are present and the output argument rand is of rank 1 .) |
Possible calling interfaces ⛓
size(mean, 1) == size(rand, 1)
must hold for the corresponding input arguments.size(mean, 2) == size(cumPropVol)
must hold for the corresponding input arguments.rank(rand) == 2 .and. size(invmul) == size(rand, 2)
must hold for the corresponding input arguments.rank(rand) == 2 .and. size(invmul) == size(membership)
must hold for the corresponding input arguments.rank(rand) == 2 .and. all(shape(mahalSq) == [size(mean, 2), size(rand, 2)])
must hold for the corresponding input arguments.size(chol, 1) <= size(chol, 2)
must hold for the corresponding input arguments (to ensure that arguments can be passed without data copy).all(shape(invGram) == [size(mean, 1), size(mean, 1), size(mean, 2))
must hold for the corresponding input arguments.all([size(chol, 1), size(chol, 3)] == shape(mean))
must hold for the corresponding input arguments.CHECK_ENABLED=1
.impure
. The procedures of this generic interface are pure
when the input argument rng
is set to xoshiro256ssw_type and the compile-time macro CHECK_ENABLED
is set to 0
or is undefined.
Example usage ⛓
ifort
compiler ⛓ ifort
compiler ⛓ gfortran
compiler ⛓
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.
Definition at line 915 of file pm_distUnifElls.F90.