Perform an unbiased random shuffling of the input array, known as the Knuth or Fisher-Yates shuffle.
- Parameters
-
[in,out] | rng | : The input/output scalar that can be an object of,
-
type rngf_type, implying the use of intrinsic Fortran uniform RNG.
-
type xoshiro256ssw_type, implying the use of xoshiro256** uniform RNG.
(optional, default = rngf_type, implying the use of the intrinsic Fortran URNG.) |
[in,out] | array | : The input/output contiguous array of shape (:) of either
-
type
character of kind any supported by the processor (e.g., SK, SKA, SKD , or SKU),
-
type
logical of kind any supported by the processor (e.g., LK),
-
type
integer of kind any supported by the processor (e.g., IK, IK8, IK16, IK32, or IK64),
-
type
complex of kind any supported by the processor (e.g., CK, CK32, CK64, or CK128),
-
type
real of kind any supported by the processor (e.g., RK, RK32, RK64, or RK128),
or,
-
a scalar assumed-length
character of kind any supported by the processor (e.g., SK, SKA, SKD , or SKU),
whose first (1:count) elements will be shuffled uniformly-randomly on return.
The rest of the elements of array(count + 1:) will be shuffled but non-uniformly. |
[in] | count | : The input positive scalar integer of default kind IK, containing the number of elements of the unique uniformly-random draws (shuffled elements) from the input array .
If specified, only the first count elements of the input/output sequence array are guaranteed to be randomly uniformly shuffled.
The specified count must not be larger than the length of the input sequence array .
(optional, default = len(array) for scalar character input array , otherwise size(array) .) |
Possible calling interfaces ⛓
Perform an unbiased random shuffling of the input array, known as the Knuth or Fisher-Yates shuffle.
This module contains procedures and generic interfaces for shuffling arrays of various types.
- Warning
- The condition
0 <= count
must hold for the corresponding input arguments.
The condition count <= lenArray
must hold for the corresponding input arguments where lenArray
represents the length of the input sequence.
These conditions are verified only if the library is built with the preprocessor macro CHECK_ENABLED=1
.
- See also
- getChoice
setChoice
getRemapped
setRemapped
getReversed
setReversed
Example usage ⛓
14 integer(IK) :: count, itry, ntry
= 10
15 type(display_type) :: disp
19 character(:),
allocatable :: array
23 call disp%show(
"count = getUnifRand(4, 10)")
25 call disp%show(
"array = getUnifRand(repeat('A', count), repeat('Z', count)) ! generate random array for illustration.")
26 array
= getUnifRand(
repeat(
'A', count),
repeat(
'Z', count))
28 call disp%show( array, deliml
= SK_
"""" )
29 call disp%show(
"call setShuffled(array)")
32 call disp%show( array, deliml
= SK_
"""" )
35 call disp%show(
"count = getUnifRand(0, len(array))")
39 call disp%show(
"call setShuffled(array, count) ! draw randomly only `count` elements without replacement.")
42 call disp%show( array, deliml
= SK_
"""" )
48 character(
2),
allocatable :: array(:)
52 call disp%show(
"count = getUnifRand(4, 10)")
54 call disp%show(
"array = getUnifRand('AA', 'ZZ', count) ! generate random array for illustration.")
57 call disp%show( array, deliml
= SK_
"""" )
58 call disp%show(
"call setShuffled(array)")
61 call disp%show( array, deliml
= SK_
"""" )
64 call disp%show(
"count = getUnifRand(0, size(array))")
68 call disp%show(
"call setShuffled(array, count) ! draw randomly only `count` elements without replacement.")
71 call disp%show( array, deliml
= SK_
"""" )
77 integer,
allocatable :: array(:)
81 call disp%show(
"count = getUnifRand(4, 10)")
83 call disp%show(
"array = getUnifRand(0, 9, count) ! generate random array for illustration.")
87 call disp%show(
"call setShuffled(array)")
93 call disp%show(
"count = getUnifRand(0, size(array))")
97 call disp%show(
"call setShuffled(array, count) ! draw randomly only `count` elements without replacement.")
106 logical,
allocatable :: array(:)
110 call disp%show(
"count = getUnifRand(4, 10)")
112 call disp%show(
"array = getUnifRand(.false., .true., count) ! generate random array for illustration.")
116 call disp%show(
"call setShuffled(array)")
122 call disp%show(
"count = getUnifRand(0, size(array))")
126 call disp%show(
"call setShuffled(array, count) ! draw randomly only `count` elements without replacement.")
135 complex,
allocatable :: array(:)
139 call disp%show(
"count = getUnifRand(4, 10)")
141 call disp%show(
"array = getUnifRand((0., 0.), (1., 1.), count) ! generate random array for illustration.")
145 call disp%show(
"call setShuffled(array)")
151 call disp%show(
"count = getUnifRand(0, size(array))")
155 call disp%show(
"call setShuffled(array, count) ! draw randomly only `count` elements without replacement.")
164 real,
allocatable :: array(:)
168 call disp%show(
"count = getUnifRand(4, 10)")
170 call disp%show(
"array = getUnifRand(0., 1., count) ! generate random array for illustration.")
174 call disp%show(
"call setShuffled(array)")
180 call disp%show(
"count = getUnifRand(0, size(array))")
184 call disp%show(
"call setShuffled(array, count) ! draw randomly only `count` elements without replacement.")
Generate and return a scalar or a contiguous array of rank 1 of length s1 of randomly uniformly distr...
This is a generic method of the derived type display_type with pass attribute.
This is a generic method of the derived type display_type with pass attribute.
This module contains classes and procedures for computing various statistical quantities related to t...
This module contains classes and procedures for input/output (IO) or generic display operations on st...
type(display_type) disp
This is a scalar module variable an object of type display_type for general display.
This module defines the relevant Fortran kind type-parameters frequently used in the ParaMonte librar...
integer, parameter RK
The default real kind in the ParaMonte library: real64 in Fortran, c_double in C-Fortran Interoperati...
integer, parameter LK
The default logical kind in the ParaMonte library: kind(.true.) in Fortran, kind(....
integer, parameter CK
The default complex kind in the ParaMonte library: real64 in Fortran, c_double_complex in C-Fortran I...
integer, parameter IK
The default integer kind in the ParaMonte library: int32 in Fortran, c_int32_t in C-Fortran Interoper...
integer, parameter SK
The default character kind in the ParaMonte library: kind("a") in Fortran, c_char in C-Fortran Intero...
Generate and return an object of type display_type.
Example Unix compile command via Intel ifort
compiler ⛓
3ifort -fpp -standard-semantics -O3 -Wl,-rpath,../../../lib -I../../../inc main.F90 ../../../lib/libparamonte* -o main.exe
Example Windows Batch compile command via Intel ifort
compiler ⛓
2set PATH=..\..\..\lib;%PATH%
3ifort /fpp /standard-semantics /O3 /I:..\..\..\include main.F90 ..\..\..\lib\libparamonte*.lib /exe:main.exe
Example Unix / MinGW compile command via GNU gfortran
compiler ⛓
3gfortran -cpp -ffree-line-length-none -O3 -Wl,-rpath,../../../lib -I../../../inc main.F90 ../../../lib/libparamonte* -o main.exe
Example output ⛓
3array
= getUnifRand(
repeat(
'A', count),
repeat(
'Z', count))
18array
= getUnifRand(
repeat(
'A', count),
repeat(
'Z', count))
33array
= getUnifRand(
repeat(
'A', count),
repeat(
'Z', count))
48array
= getUnifRand(
repeat(
'A', count),
repeat(
'Z', count))
63array
= getUnifRand(
repeat(
'A', count),
repeat(
'Z', count))
78array
= getUnifRand(
repeat(
'A', count),
repeat(
'Z', count))
93array
= getUnifRand(
repeat(
'A', count),
repeat(
'Z', count))
108array
= getUnifRand(
repeat(
'A', count),
repeat(
'Z', count))
123array
= getUnifRand(
repeat(
'A', count),
repeat(
'Z', count))
138array
= getUnifRand(
repeat(
'A', count),
repeat(
'Z', count))
155"MV",
"OJ",
"CI",
"OV",
"BM",
"OM"
158"BM",
"MV",
"OV",
"OM",
"OJ",
"CI"
165"OV",
"MV",
"BM",
"OM",
"OJ",
"CI"
170"QU",
"RK",
"HB",
"EK",
"QM",
"IZ",
"SU",
"CS",
"AX",
"NE"
173"IZ",
"HB",
"RK",
"AX",
"QM",
"NE",
"QU",
"EK",
"SU",
"CS"
180"IZ",
"HB",
"RK",
"AX",
"QM",
"NE",
"QU",
"EK",
"SU",
"CS"
185"NE",
"GO",
"BG",
"BA",
"RS",
"QX",
"AJ",
"QQ",
"LQ",
"VA"
188"BA",
"QX",
"LQ",
"NE",
"GO",
"BG",
"VA",
"RS",
"AJ",
"QQ"
195"BA",
"QX",
"LQ",
"NE",
"GO",
"BG",
"VA",
"RS",
"AJ",
"QQ"
200"VZ",
"JM",
"GC",
"PH"
203"VZ",
"PH",
"GC",
"JM"
210"VZ",
"PH",
"GC",
"JM"
215"NP",
"GP",
"HZ",
"KM"
218"NP",
"GP",
"KM",
"HZ"
225"KM",
"GP",
"NP",
"HZ"
230"OT",
"OQ",
"NN",
"SG",
"RW"
233"RW",
"NN",
"OQ",
"OT",
"SG"
240"OQ",
"NN",
"OT",
"RW",
"SG"
245"HW",
"YC",
"UE",
"QI"
248"UE",
"HW",
"QI",
"YC"
255"QI",
"YC",
"HW",
"UE"
260"AV",
"LF",
"WM",
"PK",
"KP",
"MG"
263"PK",
"WM",
"MG",
"LF",
"KP",
"AV"
270"AV",
"WM",
"MG",
"LF",
"KP",
"PK"
275"ZD",
"MO",
"SJ",
"ZZ",
"MC",
"VL"
278"ZD",
"SJ",
"ZZ",
"MO",
"VL",
"MC"
285"ZD",
"SJ",
"MC",
"MO",
"VL",
"ZZ"
290"EH",
"OI",
"OK",
"VW",
"PN",
"XQ",
"BN",
"ZP"
293"BN",
"OI",
"PN",
"OK",
"ZP",
"VW",
"EH",
"XQ"
300"PN",
"ZP",
"XQ",
"OK",
"OI",
"VW",
"EH",
"BN"
305+6,
+3,
+7,
+8,
+0,
+0,
+4,
+8,
+2,
+4
308+7,
+2,
+8,
+6,
+4,
+3,
+8,
+0,
+4,
+0
315+2,
+8,
+3,
+8,
+4,
+6,
+7,
+0,
+4,
+0
335+2,
+6,
+7,
+5,
+8,
+9,
+9
338+7,
+6,
+9,
+2,
+8,
+5,
+9
345+5,
+9,
+9,
+2,
+7,
+8,
+6
350+3,
+4,
+7,
+8,
+2,
+4,
+8
353+8,
+8,
+4,
+2,
+4,
+3,
+7
360+3,
+4,
+8,
+2,
+4,
+8,
+7
365+8,
+6,
+4,
+3,
+6,
+9,
+1,
+2,
+1,
+3
368+6,
+9,
+1,
+1,
+2,
+6,
+3,
+3,
+8,
+4
375+9,
+3,
+1,
+3,
+2,
+6,
+6,
+1,
+8,
+4
380+3,
+8,
+8,
+2,
+8,
+6
383+2,
+6,
+8,
+8,
+3,
+8
390+8,
+6,
+8,
+2,
+3,
+8
410+5,
+3,
+7,
+5,
+7,
+1,
+2
413+2,
+5,
+1,
+7,
+3,
+7,
+5
420+1,
+5,
+5,
+3,
+7,
+2,
+7
425+1,
+2,
+3,
+0,
+0,
+4,
+5
428+0,
+5,
+2,
+4,
+3,
+1,
+0
435+0,
+2,
+5,
+4,
+3,
+1,
+0
440+1,
+1,
+3,
+6,
+3,
+8,
+2
443+1,
+1,
+2,
+6,
+3,
+3,
+8
450+3,
+1,
+2,
+6,
+3,
+1,
+8
470F, T, T, F, F, T, T, T, T, F
473F, T, F, F, T, T, F, T, T, T
480T, T, F, T, F, F, F, T, T, T
515F, F, F, F, T, F, F, F, T
518T, F, F, T, F, F, F, F, F
525T, F, F, T, F, F, F, F, F
605(
+0.834680915,
+0.373537838), (
+0.455232263,
+0.944435596E-3), (
+0.143759429,
+0.508736908), (
+0.428740501,
+0.849342763), (
+0.488647282,
+0.452931702), (
+0.708962917,
+0.124783278), (
+0.796450853,
+0.823142469), (
+0.684611917,
+0.179897964)
608(
+0.428740501,
+0.849342763), (
+0.488647282,
+0.452931702), (
+0.708962917,
+0.124783278), (
+0.684611917,
+0.179897964), (
+0.455232263,
+0.944435596E-3), (
+0.834680915,
+0.373537838), (
+0.796450853,
+0.823142469), (
+0.143759429,
+0.508736908)
615(
+0.834680915,
+0.373537838), (
+0.488647282,
+0.452931702), (
+0.428740501,
+0.849342763), (
+0.455232263,
+0.944435596E-3), (
+0.143759429,
+0.508736908), (
+0.708962917,
+0.124783278), (
+0.684611917,
+0.179897964), (
+0.796450853,
+0.823142469)
620(
+0.511983097,
+0.321241379), (
+0.245675802,
+0.869327128), (
+0.998765171,
+0.390220284E-1), (
+0.236380100,
+0.671525359), (
+0.214736223,
+0.507051766), (
+0.940484405,
+0.420090318), (
+0.410217226,
+0.869851232)
623(
+0.940484405,
+0.420090318), (
+0.236380100,
+0.671525359), (
+0.245675802,
+0.869327128), (
+0.511983097,
+0.321241379), (
+0.214736223,
+0.507051766), (
+0.410217226,
+0.869851232), (
+0.998765171,
+0.390220284E-1)
630(
+0.998765171,
+0.390220284E-1), (
+0.940484405,
+0.420090318), (
+0.245675802,
+0.869327128), (
+0.236380100,
+0.671525359), (
+0.214736223,
+0.507051766), (
+0.410217226,
+0.869851232), (
+0.511983097,
+0.321241379)
635(
+0.660359502,
+0.793549061), (
+0.992908955,
+0.778287292), (
+0.581238091,
+0.658040583), (
+0.761271179,
+0.595197797), (
+0.361036658,
+0.589399993), (
+0.744804144,
+0.488637745), (
+0.497796595,
+0.616843879), (
+0.965064764E-2,
+0.161347449), (
+0.710910857,
+0.675622165), (
+0.173549712,
+0.370471001)
638(
+0.710910857,
+0.675622165), (
+0.581238091,
+0.658040583), (
+0.992908955,
+0.778287292), (
+0.965064764E-2,
+0.161347449), (
+0.744804144,
+0.488637745), (
+0.660359502,
+0.793549061), (
+0.761271179,
+0.595197797), (
+0.497796595,
+0.616843879), (
+0.361036658,
+0.589399993), (
+0.173549712,
+0.370471001)
645(
+0.710910857,
+0.675622165), (
+0.581238091,
+0.658040583), (
+0.992908955,
+0.778287292), (
+0.965064764E-2,
+0.161347449), (
+0.744804144,
+0.488637745), (
+0.660359502,
+0.793549061), (
+0.761271179,
+0.595197797), (
+0.497796595,
+0.616843879), (
+0.361036658,
+0.589399993), (
+0.173549712,
+0.370471001)
650(
+0.674531221,
+0.709053636), (
+0.760627270,
+0.328963757), (
+0.746077597,
+0.551066399), (
+0.653535664,
+0.743193448), (
+0.708052754,
+0.126029074), (
+0.112686098,
+0.337355077), (
+0.904179811E-1,
+0.493658304)
653(
+0.760627270,
+0.328963757), (
+0.746077597,
+0.551066399), (
+0.708052754,
+0.126029074), (
+0.112686098,
+0.337355077), (
+0.904179811E-1,
+0.493658304), (
+0.653535664,
+0.743193448), (
+0.674531221,
+0.709053636)
660(
+0.653535664,
+0.743193448), (
+0.708052754,
+0.126029074), (
+0.746077597,
+0.551066399), (
+0.112686098,
+0.337355077), (
+0.904179811E-1,
+0.493658304), (
+0.760627270,
+0.328963757), (
+0.674531221,
+0.709053636)
665(
+0.834695697,
+0.123252094), (
+0.433920145,
+0.303880274), (
+0.395114660,
+0.735439956), (
+0.153032184,
+0.201784492), (
+0.458145022,
+0.709687293)
668(
+0.433920145,
+0.303880274), (
+0.834695697,
+0.123252094), (
+0.395114660,
+0.735439956), (
+0.458145022,
+0.709687293), (
+0.153032184,
+0.201784492)
675(
+0.458145022,
+0.709687293), (
+0.153032184,
+0.201784492), (
+0.395114660,
+0.735439956), (
+0.433920145,
+0.303880274), (
+0.834695697,
+0.123252094)
680(
+0.963831723,
+0.636827350), (
+0.378730714,
+0.320274115), (
+0.281570494,
+0.953615904), (
+0.400461137,
+0.389462471), (
+0.247055292,
+0.853823841), (
+0.965692282,
+0.335247576), (
+0.765965998,
+0.517767668)
683(
+0.281570494,
+0.953615904), (
+0.247055292,
+0.853823841), (
+0.765965998,
+0.517767668), (
+0.378730714,
+0.320274115), (
+0.400461137,
+0.389462471), (
+0.965692282,
+0.335247576), (
+0.963831723,
+0.636827350)
690(
+0.281570494,
+0.953615904), (
+0.247055292,
+0.853823841), (
+0.765965998,
+0.517767668), (
+0.378730714,
+0.320274115), (
+0.400461137,
+0.389462471), (
+0.965692282,
+0.335247576), (
+0.963831723,
+0.636827350)
695(
+0.750934899,
+0.327126324), (
+0.658757687E-1,
+0.571905077), (
+0.253057063,
+0.152806342), (
+0.602365077,
+0.355686128)
698(
+0.658757687E-1,
+0.571905077), (
+0.602365077,
+0.355686128), (
+0.253057063,
+0.152806342), (
+0.750934899,
+0.327126324)
705(
+0.253057063,
+0.152806342), (
+0.750934899,
+0.327126324), (
+0.658757687E-1,
+0.571905077), (
+0.602365077,
+0.355686128)
710(
+0.754587114,
+0.308714628), (
+0.678682745,
+0.534056962), (
+0.419425070,
+0.558920503), (
+0.972943425,
+0.490928829), (
+0.897468805,
+0.412264049), (
+0.862294436E-1,
+0.240212142), (
+0.882552207,
+0.868682265E-1), (
+0.314425051,
+0.231942058)
713(
+0.897468805,
+0.412264049), (
+0.678682745,
+0.534056962), (
+0.862294436E-1,
+0.240212142), (
+0.419425070,
+0.558920503), (
+0.314425051,
+0.231942058), (
+0.754587114,
+0.308714628), (
+0.882552207,
+0.868682265E-1), (
+0.972943425,
+0.490928829)
720(
+0.862294436E-1,
+0.240212142), (
+0.314425051,
+0.231942058), (
+0.897468805,
+0.412264049), (
+0.419425070,
+0.558920503), (
+0.678682745,
+0.534056962), (
+0.754587114,
+0.308714628), (
+0.882552207,
+0.868682265E-1), (
+0.972943425,
+0.490928829)
725(
+0.949395537,
+0.258144438), (
+0.566200614,
+0.784127653), (
+0.853508353,
+0.570670128), (
+0.497632027E-1,
+0.582485914), (
+0.794579208,
+0.631176829), (
+0.731608033,
+0.599373341), (
+0.450123072,
+0.294433832E-1), (
+0.159482837,
+0.950143635)
728(
+0.794579208,
+0.631176829), (
+0.853508353,
+0.570670128), (
+0.731608033,
+0.599373341), (
+0.497632027E-1,
+0.582485914), (
+0.566200614,
+0.784127653), (
+0.159482837,
+0.950143635), (
+0.949395537,
+0.258144438), (
+0.450123072,
+0.294433832E-1)
735(
+0.731608033,
+0.599373341), (
+0.949395537,
+0.258144438), (
+0.794579208,
+0.631176829), (
+0.497632027E-1,
+0.582485914), (
+0.566200614,
+0.784127653), (
+0.159482837,
+0.950143635), (
+0.853508353,
+0.570670128), (
+0.450123072,
+0.294433832E-1)
740(
+0.183834136,
+0.600032449), (
+0.840258837,
+0.614135087), (
+0.136981428,
+0.333466947), (
+0.612133622,
+0.780205131), (
+0.204359412,
+0.368407011)
743(
+0.840258837,
+0.614135087), (
+0.204359412,
+0.368407011), (
+0.612133622,
+0.780205131), (
+0.136981428,
+0.333466947), (
+0.183834136,
+0.600032449)
750(
+0.183834136,
+0.600032449), (
+0.204359412,
+0.368407011), (
+0.612133622,
+0.780205131), (
+0.136981428,
+0.333466947), (
+0.840258837,
+0.614135087)
755+0.731208444,
+0.677431405,
+0.411407888,
+0.318547785,
+0.147988319,
+0.622487724,
+0.441724658E-1,
+0.259052634
758+0.731208444,
+0.677431405,
+0.147988319,
+0.259052634,
+0.441724658E-1,
+0.622487724,
+0.318547785,
+0.411407888
765+0.147988319,
+0.259052634,
+0.441724658E-1,
+0.677431405,
+0.318547785,
+0.622487724,
+0.731208444,
+0.411407888
770+0.219860852,
+0.537576556,
+0.804618239,
+0.496696591,
+0.415843666,
+0.111097097,
+0.739349961,
+0.911193967
773+0.219860852,
+0.415843666,
+0.911193967,
+0.804618239,
+0.111097097,
+0.739349961,
+0.537576556,
+0.496696591
780+0.804618239,
+0.415843666,
+0.911193967,
+0.219860852,
+0.111097097,
+0.739349961,
+0.537576556,
+0.496696591
785+0.301275849,
+0.649399281,
+0.514105320,
+0.657246113,
+0.524138868,
+0.654278398E-1,
+0.736789227,
+0.251535118,
+0.525406957
788+0.649399281,
+0.654278398E-1,
+0.525406957,
+0.514105320,
+0.524138868,
+0.301275849,
+0.657246113,
+0.736789227,
+0.251535118
795+0.654278398E-1,
+0.514105320,
+0.524138868,
+0.251535118,
+0.525406957,
+0.301275849,
+0.657246113,
+0.736789227,
+0.649399281
800+0.291693270,
+0.275457978,
+0.256953239,
+0.233196735,
+0.552217543
803+0.256953239,
+0.233196735,
+0.552217543,
+0.291693270,
+0.275457978
810+0.233196735,
+0.291693270,
+0.275457978,
+0.552217543,
+0.256953239
815+0.951786816,
+0.291652143,
+0.206996024,
+0.623316526,
+0.558506906,
+0.547552049,
+0.143187046E-1
818+0.206996024,
+0.623316526,
+0.143187046E-1,
+0.547552049,
+0.558506906,
+0.291652143,
+0.951786816
825+0.143187046E-1,
+0.558506906,
+0.206996024,
+0.951786816,
+0.291652143,
+0.623316526,
+0.547552049
830+0.952786744,
+0.168502927E-1,
+0.700375438,
+0.599286497,
+0.571049988,
+0.916320622,
+0.958574414,
+0.776775718,
+0.744182289
833+0.952786744,
+0.916320622,
+0.700375438,
+0.571049988,
+0.599286497,
+0.168502927E-1,
+0.958574414,
+0.776775718,
+0.744182289
840+0.958574414,
+0.776775718,
+0.916320622,
+0.168502927E-1,
+0.744182289,
+0.599286497,
+0.700375438,
+0.952786744,
+0.571049988
845+0.754724145E-1,
+0.917694151,
+0.172486305E-1,
+0.924230397,
+0.605927527,
+0.742885530,
+0.878512383,
+0.517113924,
+0.154757917,
+0.644013703
848+0.644013703,
+0.924230397,
+0.172486305E-1,
+0.742885530,
+0.917694151,
+0.878512383,
+0.605927527,
+0.517113924,
+0.154757917,
+0.754724145E-1
855+0.742885530,
+0.924230397,
+0.172486305E-1,
+0.644013703,
+0.917694151,
+0.878512383,
+0.605927527,
+0.517113924,
+0.154757917,
+0.754724145E-1
860+0.293726325E-1,
+0.936989665,
+0.497731805,
+0.315658152,
+0.982578814,
+0.893484950,
+0.897144973
863+0.893484950,
+0.293726325E-1,
+0.897144973,
+0.497731805,
+0.315658152,
+0.982578814,
+0.936989665
870+0.893484950,
+0.293726325E-1,
+0.897144973,
+0.497731805,
+0.315658152,
+0.982578814,
+0.936989665
875+0.849202693,
+0.768660307,
+0.863514185,
+0.836149454,
+0.154337108,
+0.666713715E-1,
+0.230043352,
+0.196436882
878+0.196436882,
+0.154337108,
+0.666713715E-1,
+0.768660307,
+0.863514185,
+0.230043352,
+0.849202693,
+0.836149454
885+0.836149454,
+0.154337108,
+0.666713715E-1,
+0.768660307,
+0.863514185,
+0.230043352,
+0.849202693,
+0.196436882
890+0.161709487,
+0.314184189,
+0.871208906,
+0.353571177,
+0.520778716,
+0.575232625,
+0.973841310
893+0.314184189,
+0.973841310,
+0.871208906,
+0.520778716,
+0.575232625,
+0.353571177,
+0.161709487
900+0.575232625,
+0.314184189,
+0.871208906,
+0.520778716,
+0.973841310,
+0.353571177,
+0.161709487
- Test:
- test_pm_arrayShuffle
- Todo:
- Low Priority: This generic interface can be extended to 2D input objects.
- Todo:
- High Priority: Update 2021: This task is now resolved.
The current random integer generator uses a simple double precision real
conversion to integer
values.
While this works fairly well for most use cases, it may biased for generating random integer
of kind IK4.
A future remedy should use Bitmask with Rejection as described here.
As of 2021, the use of double precision (64-bit) vs. single-precision for random number generation increases the computational cost of the algorithms by about three times.
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.
-
If you use any parts or concepts from this library to any extent, please acknowledge the usage by citing the relevant publications of the ParaMonte library.
-
If you regenerate any parts/ideas from this library in a programming environment other than those currently supported by this ParaMonte library (i.e., other than C, C++, Fortran, MATLAB, Python, R), please also ask the end users to cite this original ParaMonte library.
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.
- Copyright
- Computational Data Science Lab
- Author:
- Amir Shahmoradi, September 1, 2017, 12:00 AM, Institute for Computational Engineering and Sciences (ICES), The University of Texas Austin
Definition at line 688 of file pm_arrayShuffle.F90.