Procedure for generating a random array index/subscripts
Generate an array of random indices of an 1D array distributed according to cdf
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(rng_type), | intent(inout) | :: | r | Random Number Generator |
||
| real(kind=Float64), | intent(in), | dimension(:) | :: | cdf | 1D array of index weights |
|
| integer, | intent(out), | dimension(:) | :: | randomi | Random indices |
Generate an array of random indices of an 1D array distributed according to cdf
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=Float64), | intent(in), | dimension(:) | :: | cdf | 1D array of index weights |
|
| integer, | intent(out), | dimension(:) | :: | randomi | Random indices |