Procedure for generating a random array index/subscripts
Generate a array of uniformally-distributed random integers in the range [1, n]
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | n | Largest possible value |
||
integer, | intent(out), | dimension(:) | :: | randomi | Array of uniform deviates |
Generate an array of random indices of an 1D array distributed according to w
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=Float64), | intent(in), | dimension(:) | :: | w | 1D array of index weights |
|
integer, | intent(out), | dimension(:) | :: | randomi | Random indices |
Generate an array of random subscripts of an 2D array distributed according to w
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=Float64), | intent(in), | dimension(:,:) | :: | w | 2D array of subscript weights |
|
integer, | intent(out), | dimension(:,:) | :: | randomi | A 2D (ndim, :) array of random subscripts |
Generate an array of random subscripts of an 3D array distributed according to w
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=Float64), | intent(in), | dimension(:,:,:) | :: | w | 3D array of subscript weights |
|
integer, | intent(out), | dimension(:,:) | :: | randomi | A 2D (ndim, :) array of random subscripts |
Generate an array of random subscripts of an 4D array distributed according to w
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=Float64), | intent(in), | dimension(:,:,:,:) | :: | w | 4D array of subscript weights |
|
integer, | intent(out), | dimension(:,:) | :: | randomi | A 2D (ndim, :) array of random subscripts |
Generate an array of random subscripts of an 5D array distributed according to w
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
real(kind=Float64), | intent(in), | dimension(:,:,:,:,:) | :: | w | 5D array of subscript weights |
|
integer, | intent(out), | dimension(:,:) | :: | randomi | A 2D (ndim, :) array of random subscripts |
Generate a array of uniformally-distributed random integers in the range [1, n]
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(rng_type), | intent(inout) | :: | r | Random Number Generator |
||
integer, | intent(in) | :: | n | Largest possible value |
||
integer, | intent(out), | dimension(:) | :: | randomi | Array of uniform deviates |
Generate an array of random indices of an 1D array distributed according to w
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(rng_type), | intent(inout) | :: | r | Random Number Generator |
||
real(kind=Float64), | intent(in), | dimension(:) | :: | w | 1D array of index weights |
|
integer, | intent(out), | dimension(:) | :: | randomi | Random indices |
Generate an array of random subscripts of an 2D array distributed according to w
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(rng_type), | intent(inout) | :: | r | Random Number Generator |
||
real(kind=Float64), | intent(in), | dimension(:,:), target | :: | w | 2D array of subscript weights |
|
integer, | intent(out), | dimension(:,:) | :: | randomi | A 2D (ndim, :) array of random subscripts |
Generate an array of random subscripts of an 3D array distributed according to w
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(rng_type), | intent(inout) | :: | r | Random Number Generator |
||
real(kind=Float64), | intent(in), | dimension(:,:,:), target | :: | w | 3D array of subscript weights |
|
integer, | intent(out), | dimension(:,:) | :: | randomi | A 2D (ndim, :) array of random subscripts |
Generate an array of random subscripts of an 4D array distributed according to w
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(rng_type), | intent(inout) | :: | r | Random Number Generator |
||
real(kind=Float64), | intent(in), | dimension(:,:,:,:), target | :: | w | 4D array of subscript weights |
|
integer, | intent(out), | dimension(:,:) | :: | randomi | A 2D (ndim, :) array of random subscripts |
Generate an array of random subscripts of an 5D array distributed according to w
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
type(rng_type), | intent(inout) | :: | r | Random Number Generator |
||
real(kind=Float64), | intent(in), | dimension(:,:,:,:,:), target | :: | w | 5D array of subscript weights |
|
integer, | intent(out), | dimension(:,:) | :: | randomi | A 2D (ndim, :) array of random subscripts |