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"IY",
"YP",
"EK",
"YH"
158"YH",
"YP",
"EK",
"IY"
165"YH",
"YP",
"EK",
"IY"
170"XF",
"AS",
"BS",
"AB",
"PP",
"CN",
"UM"
173"AS",
"AB",
"XF",
"UM",
"PP",
"BS",
"CN"
180"CN",
"AB",
"XF",
"UM",
"PP",
"BS",
"AS"
185"OV",
"XW",
"OB",
"WD",
"LO",
"ZC",
"CK",
"PH",
"OF"
188"ZC",
"CK",
"XW",
"WD",
"PH",
"OB",
"OV",
"OF",
"LO"
195"ZC",
"LO",
"WD",
"OB",
"PH",
"XW",
"OV",
"OF",
"CK"
200"AM",
"AW",
"YW",
"IC",
"LA",
"LX"
203"AM",
"IC",
"AW",
"LX",
"YW",
"LA"
210"LA",
"YW",
"IC",
"LX",
"AW",
"AM"
215"NO",
"BY",
"JN",
"YL",
"OZ",
"SW",
"XU",
"WK"
218"BY",
"XU",
"NO",
"OZ",
"JN",
"WK",
"YL",
"SW"
225"BY",
"XU",
"NO",
"OZ",
"JN",
"WK",
"YL",
"SW"
230"HV",
"DB",
"GP",
"UN",
"RE",
"ID",
"KY"
233"UN",
"DB",
"RE",
"ID",
"GP",
"KY",
"HV"
240"DB",
"RE",
"UN",
"ID",
"GP",
"HV",
"KY"
245"XJ",
"OJ",
"AP",
"ZN",
"DL",
"QQ",
"WO",
"OL"
248"AP",
"XJ",
"QQ",
"OL",
"WO",
"ZN",
"DL",
"OJ"
255"AP",
"XJ",
"QQ",
"OL",
"WO",
"ZN",
"DL",
"OJ"
260"WJ",
"IO",
"JQ",
"UG",
"ZB",
"LW",
"YN",
"BA"
263"IO",
"LW",
"JQ",
"YN",
"WJ",
"BA",
"ZB",
"UG"
270"IO",
"WJ",
"JQ",
"YN",
"LW",
"BA",
"ZB",
"UG"
275"FF",
"WP",
"LX",
"TG",
"BV",
"NX",
"PY",
"XS"
278"TG",
"FF",
"LX",
"XS",
"BV",
"NX",
"WP",
"PY"
285"LX",
"XS",
"TG",
"FF",
"BV",
"NX",
"WP",
"PY"
290"XW",
"CP",
"GW",
"LL"
293"CP",
"GW",
"XW",
"LL"
300"CP",
"LL",
"XW",
"GW"
320+2,
+5,
+5,
+6,
+1,
+0
323+0,
+5,
+5,
+2,
+6,
+1
330+1,
+2,
+0,
+6,
+5,
+5
335+0,
+9,
+8,
+2,
+0,
+3,
+7
338+7,
+3,
+0,
+0,
+2,
+9,
+8
345+0,
+3,
+7,
+0,
+2,
+9,
+8
350+4,
+0,
+3,
+5,
+7,
+9,
+1,
+0,
+4
353+5,
+0,
+4,
+7,
+0,
+9,
+1,
+4,
+3
360+4,
+4,
+7,
+3,
+0,
+0,
+1,
+9,
+5
365+8,
+4,
+5,
+0,
+8,
+1,
+5,
+8
368+4,
+8,
+0,
+8,
+8,
+5,
+5,
+1
375+4,
+8,
+8,
+5,
+0,
+5,
+8,
+1
380+6,
+8,
+2,
+6,
+5,
+2,
+3
383+5,
+2,
+2,
+6,
+3,
+6,
+8
390+6,
+6,
+2,
+8,
+3,
+5,
+2
395+8,
+3,
+1,
+9,
+7,
+7,
+8,
+2
398+2,
+1,
+7,
+8,
+3,
+8,
+7,
+9
405+8,
+1,
+7,
+8,
+3,
+2,
+7,
+9
410+0,
+6,
+1,
+9,
+0,
+4
413+0,
+1,
+0,
+6,
+4,
+9
420+6,
+9,
+0,
+0,
+4,
+1
425+7,
+3,
+7,
+1,
+5,
+5,
+2,
+0
428+0,
+5,
+5,
+1,
+2,
+3,
+7,
+7
435+7,
+5,
+2,
+1,
+5,
+3,
+7,
+0
440+4,
+6,
+4,
+4,
+5,
+4,
+1,
+3
443+6,
+4,
+4,
+4,
+1,
+3,
+4,
+5
450+6,
+4,
+4,
+4,
+1,
+3,
+4,
+5
485T, F, F, T, F, T, T, T, F, F
488T, T, F, F, T, F, F, T, T, F
495T, T, F, F, T, F, F, T, T, F
500F, T, F, F, T, F, T, F
503T, F, T, T, F, F, F, F
510T, F, T, T, F, F, F, F
515F, T, T, F, T, F, F, F
518F, T, T, F, F, T, F, F
525F, T, T, F, F, T, F, F
605(
+0.361772358,
+0.955501437), (
+0.617043674,
+0.184953690), (
+0.201858938,
+0.777549684), (
+0.983403265,
+0.807987213), (
+0.934765458,
+0.185687184), (
+0.804181039,
+0.488167226), (
+0.349350154,
+0.659238458), (
+0.506047845,
+0.459811449), (
+0.827084363,
+0.363054156), (
+0.815816522E-1,
+0.314366281)
608(
+0.804181039,
+0.488167226), (
+0.361772358,
+0.955501437), (
+0.815816522E-1,
+0.314366281), (
+0.983403265,
+0.807987213), (
+0.617043674,
+0.184953690), (
+0.201858938,
+0.777549684), (
+0.506047845,
+0.459811449), (
+0.349350154,
+0.659238458), (
+0.827084363,
+0.363054156), (
+0.934765458,
+0.185687184)
615(
+0.506047845,
+0.459811449), (
+0.983403265,
+0.807987213), (
+0.361772358,
+0.955501437), (
+0.815816522E-1,
+0.314366281), (
+0.349350154,
+0.659238458), (
+0.201858938,
+0.777549684), (
+0.804181039,
+0.488167226), (
+0.617043674,
+0.184953690), (
+0.827084363,
+0.363054156), (
+0.934765458,
+0.185687184)
620(
+0.924579501E-1,
+0.768085063), (
+0.722191334E-1,
+0.539067090), (
+0.756772339,
+0.891037405), (
+0.571614385,
+0.264309287), (
+0.204714477,
+0.996463418), (
+0.905461431,
+0.512933135), (
+0.793388665,
+0.126297891), (
+0.536512196,
+0.127815187), (
+0.529364944,
+0.552898824)
623(
+0.905461431,
+0.512933135), (
+0.793388665,
+0.126297891), (
+0.536512196,
+0.127815187), (
+0.204714477,
+0.996463418), (
+0.924579501E-1,
+0.768085063), (
+0.571614385,
+0.264309287), (
+0.756772339,
+0.891037405), (
+0.722191334E-1,
+0.539067090), (
+0.529364944,
+0.552898824)
630(
+0.905461431,
+0.512933135), (
+0.793388665,
+0.126297891), (
+0.536512196,
+0.127815187), (
+0.204714477,
+0.996463418), (
+0.924579501E-1,
+0.768085063), (
+0.571614385,
+0.264309287), (
+0.756772339,
+0.891037405), (
+0.722191334E-1,
+0.539067090), (
+0.529364944,
+0.552898824)
635(
+0.393612444,
+0.533764005), (
+0.437731266,
+0.844150901), (
+0.946881354,
+0.408884287), (
+0.975791812E-1,
+0.120846331), (
+0.887804329,
+0.637111068E-1), (
+0.963483989,
+0.611198306), (
+0.337187707,
+0.753525794), (
+0.549887776,
+0.277787387), (
+0.205967247,
+0.596685171), (
+0.868275285,
+0.881084204)
638(
+0.437731266,
+0.844150901), (
+0.946881354,
+0.408884287), (
+0.549887776,
+0.277787387), (
+0.337187707,
+0.753525794), (
+0.975791812E-1,
+0.120846331), (
+0.887804329,
+0.637111068E-1), (
+0.868275285,
+0.881084204), (
+0.963483989,
+0.611198306), (
+0.205967247,
+0.596685171), (
+0.393612444,
+0.533764005)
645(
+0.549887776,
+0.277787387), (
+0.393612444,
+0.533764005), (
+0.337187707,
+0.753525794), (
+0.946881354,
+0.408884287), (
+0.205967247,
+0.596685171), (
+0.963483989,
+0.611198306), (
+0.868275285,
+0.881084204), (
+0.975791812E-1,
+0.120846331), (
+0.437731266,
+0.844150901), (
+0.887804329,
+0.637111068E-1)
650(
+0.985491097,
+0.961772799), (
+0.859250903,
+0.520161450), (
+0.534339666,
+0.799456000), (
+0.945103645,
+0.838083029E-1), (
+0.117124915,
+0.923276126), (
+0.747200966,
+0.504460931E-1), (
+0.481893778,
+0.111860335), (
+0.187731206,
+0.543216467E-1), (
+0.945417941,
+0.259717286), (
+0.652490556,
+0.400341868)
653(
+0.945417941,
+0.259717286), (
+0.117124915,
+0.923276126), (
+0.985491097,
+0.961772799), (
+0.481893778,
+0.111860335), (
+0.534339666,
+0.799456000), (
+0.859250903,
+0.520161450), (
+0.747200966,
+0.504460931E-1), (
+0.652490556,
+0.400341868), (
+0.945103645,
+0.838083029E-1), (
+0.187731206,
+0.543216467E-1)
660(
+0.652490556,
+0.400341868), (
+0.985491097,
+0.961772799), (
+0.945103645,
+0.838083029E-1), (
+0.534339666,
+0.799456000), (
+0.481893778,
+0.111860335), (
+0.859250903,
+0.520161450), (
+0.747200966,
+0.504460931E-1), (
+0.945417941,
+0.259717286), (
+0.117124915,
+0.923276126), (
+0.187731206,
+0.543216467E-1)
665(
+0.922179699,
+0.236639738), (
+0.580540776,
+0.508219004E-1), (
+0.113545477,
+0.248542786), (
+0.474353015,
+0.789928138), (
+0.964556992,
+0.461170733), (
+0.504411221,
+0.846972466), (
+0.260459483,
+0.771470487), (
+0.603639483,
+0.191518784), (
+0.791213095,
+0.990383446), (
+0.592488647,
+0.447277486)
668(
+0.474353015,
+0.789928138), (
+0.922179699,
+0.236639738), (
+0.113545477,
+0.248542786), (
+0.504411221,
+0.846972466), (
+0.791213095,
+0.990383446), (
+0.580540776,
+0.508219004E-1), (
+0.592488647,
+0.447277486), (
+0.603639483,
+0.191518784), (
+0.964556992,
+0.461170733), (
+0.260459483,
+0.771470487)
675(
+0.580540776,
+0.508219004E-1), (
+0.260459483,
+0.771470487), (
+0.504411221,
+0.846972466), (
+0.922179699,
+0.236639738), (
+0.474353015,
+0.789928138), (
+0.791213095,
+0.990383446), (
+0.603639483,
+0.191518784), (
+0.113545477,
+0.248542786), (
+0.964556992,
+0.461170733), (
+0.592488647,
+0.447277486)
680(
+0.178596616,
+0.975894332), (
+0.888358235,
+0.165087402), (
+0.308247089,
+0.647616982E-1), (
+0.806265473E-1,
+0.273456812), (
+0.795409203,
+0.458876133), (
+0.330556989,
+0.956825793), (
+0.429529071,
+0.371285737), (
+0.739782989,
+0.174697459)
683(
+0.178596616,
+0.975894332), (
+0.806265473E-1,
+0.273456812), (
+0.308247089,
+0.647616982E-1), (
+0.795409203,
+0.458876133), (
+0.888358235,
+0.165087402), (
+0.429529071,
+0.371285737), (
+0.739782989,
+0.174697459), (
+0.330556989,
+0.956825793)
690(
+0.178596616,
+0.975894332), (
+0.739782989,
+0.174697459), (
+0.330556989,
+0.956825793), (
+0.429529071,
+0.371285737), (
+0.806265473E-1,
+0.273456812), (
+0.308247089,
+0.647616982E-1), (
+0.795409203,
+0.458876133), (
+0.888358235,
+0.165087402)
695(
+0.224467576,
+0.336859822E-1), (
+0.201984346,
+0.731784523), (
+0.172143281,
+0.269536614), (
+0.605288684,
+0.262714446), (
+0.798157215,
+0.386693180), (
+0.570110738,
+0.714444160)
698(
+0.201984346,
+0.731784523), (
+0.605288684,
+0.262714446), (
+0.798157215,
+0.386693180), (
+0.570110738,
+0.714444160), (
+0.224467576,
+0.336859822E-1), (
+0.172143281,
+0.269536614)
705(
+0.570110738,
+0.714444160), (
+0.224467576,
+0.336859822E-1), (
+0.798157215,
+0.386693180), (
+0.201984346,
+0.731784523), (
+0.605288684,
+0.262714446), (
+0.172143281,
+0.269536614)
710(
+0.428317308,
+0.116203010), (
+0.867605209E-3,
+0.268216252), (
+0.645414293,
+0.697404981), (
+0.496494353,
+0.477706015), (
+0.111836314,
+0.924725294), (
+0.373916984,
+0.348259628), (
+0.406593084E-1,
+0.188141584), (
+0.182938874,
+0.642279983E-1), (
+0.838617146,
+0.231574118), (
+0.364681542,
+0.140128493)
713(
+0.838617146,
+0.231574118), (
+0.373916984,
+0.348259628), (
+0.496494353,
+0.477706015), (
+0.406593084E-1,
+0.188141584), (
+0.867605209E-3,
+0.268216252), (
+0.645414293,
+0.697404981), (
+0.182938874,
+0.642279983E-1), (
+0.111836314,
+0.924725294), (
+0.428317308,
+0.116203010), (
+0.364681542,
+0.140128493)
720(
+0.496494353,
+0.477706015), (
+0.182938874,
+0.642279983E-1), (
+0.373916984,
+0.348259628), (
+0.406593084E-1,
+0.188141584), (
+0.867605209E-3,
+0.268216252), (
+0.645414293,
+0.697404981), (
+0.838617146,
+0.231574118), (
+0.111836314,
+0.924725294), (
+0.428317308,
+0.116203010), (
+0.364681542,
+0.140128493)
725(
+0.216985762,
+0.581071258), (
+0.712639630,
+0.761598647), (
+0.993399739,
+0.901484966), (
+0.680132151,
+0.884062767)
728(
+0.712639630,
+0.761598647), (
+0.216985762,
+0.581071258), (
+0.680132151,
+0.884062767), (
+0.993399739,
+0.901484966)
735(
+0.712639630,
+0.761598647), (
+0.680132151,
+0.884062767), (
+0.216985762,
+0.581071258), (
+0.993399739,
+0.901484966)
740(
+0.123943746,
+0.638541639), (
+0.141469479,
+0.388844252), (
+0.980723083,
+0.422642887), (
+0.103278935,
+0.946757019), (
+0.459997773,
+0.445152342), (
+0.882296562,
+0.513571441), (
+0.428909063E-1,
+0.665532947)
743(
+0.428909063E-1,
+0.665532947), (
+0.141469479,
+0.388844252), (
+0.459997773,
+0.445152342), (
+0.980723083,
+0.422642887), (
+0.882296562,
+0.513571441), (
+0.103278935,
+0.946757019), (
+0.123943746,
+0.638541639)
750(
+0.428909063E-1,
+0.665532947), (
+0.882296562,
+0.513571441), (
+0.459997773,
+0.445152342), (
+0.980723083,
+0.422642887), (
+0.141469479,
+0.388844252), (
+0.103278935,
+0.946757019), (
+0.123943746,
+0.638541639)
755+0.969736755,
+0.531140506,
+0.155511737,
+0.331866026,
+0.948817015,
+0.713017642,
+0.711267650,
+0.859388471
758+0.155511737,
+0.948817015,
+0.531140506,
+0.969736755,
+0.859388471,
+0.711267650,
+0.331866026,
+0.713017642
765+0.155511737,
+0.948817015,
+0.531140506,
+0.969736755,
+0.859388471,
+0.711267650,
+0.331866026,
+0.713017642
770+0.178954601E-1,
+0.276965439,
+0.282427669E-1,
+0.959265232E-2,
+0.642455339,
+0.742335021,
+0.811872184,
+0.997578681,
+0.777013302E-1
773+0.282427669E-1,
+0.276965439,
+0.642455339,
+0.178954601E-1,
+0.742335021,
+0.811872184,
+0.959265232E-2,
+0.777013302E-1,
+0.997578681
780+0.777013302E-1,
+0.997578681,
+0.276965439,
+0.742335021,
+0.959265232E-2,
+0.178954601E-1,
+0.811872184,
+0.282427669E-1,
+0.642455339
785+0.140242577E-1,
+0.101570904,
+0.106773555,
+0.108435452
788+0.140242577E-1,
+0.106773555,
+0.108435452,
+0.101570904
795+0.140242577E-1,
+0.106773555,
+0.108435452,
+0.101570904
800+0.887103677,
+0.446813166,
+0.229054630,
+0.458599329,
+0.252680004
803+0.229054630,
+0.458599329,
+0.446813166,
+0.887103677,
+0.252680004
810+0.887103677,
+0.458599329,
+0.229054630,
+0.446813166,
+0.252680004
815+0.849950314E-1,
+0.372414291,
+0.858538985,
+0.656239510,
+0.973330319,
+0.168119907,
+0.993717790
818+0.372414291,
+0.849950314E-1,
+0.656239510,
+0.993717790,
+0.168119907,
+0.973330319,
+0.858538985
825+0.993717790,
+0.849950314E-1,
+0.656239510,
+0.372414291,
+0.168119907,
+0.973330319,
+0.858538985
830+0.434121013,
+0.523052812,
+0.361870527E-1,
+0.825705111,
+0.392718792
833+0.361870527E-1,
+0.523052812,
+0.392718792,
+0.434121013,
+0.825705111
840+0.361870527E-1,
+0.523052812,
+0.392718792,
+0.434121013,
+0.825705111
845+0.412757397,
+0.786342740,
+0.254138708E-1,
+0.573277295,
+0.885917902,
+0.745877981,
+0.327985168,
+0.717836618
848+0.327985168,
+0.717836618,
+0.573277295,
+0.745877981,
+0.254138708E-1,
+0.786342740,
+0.885917902,
+0.412757397
855+0.573277295,
+0.717836618,
+0.412757397,
+0.745877981,
+0.786342740,
+0.885917902,
+0.254138708E-1,
+0.327985168
860+0.155439377E-1,
+0.832366467,
+0.141575992,
+0.534395039,
+0.560551941,
+0.185489416,
+0.228192389,
+0.513671815
863+0.141575992,
+0.185489416,
+0.228192389,
+0.832366467,
+0.560551941,
+0.155439377E-1,
+0.534395039,
+0.513671815
870+0.141575992,
+0.185489416,
+0.228192389,
+0.832366467,
+0.560551941,
+0.155439377E-1,
+0.534395039,
+0.513671815
875+0.720875978,
+0.221396565,
+0.591203809,
+0.655384243,
+0.874543846,
+0.688803792,
+0.265035570,
+0.161422074,
+0.474797249,
+0.764096737
878+0.655384243,
+0.474797249,
+0.720875978,
+0.874543846,
+0.591203809,
+0.764096737,
+0.688803792,
+0.265035570,
+0.161422074,
+0.221396565
885+0.474797249,
+0.655384243,
+0.720875978,
+0.874543846,
+0.591203809,
+0.764096737,
+0.688803792,
+0.265035570,
+0.161422074,
+0.221396565
890+0.952394843,
+0.809370458,
+0.745079339,
+0.950896740E-1
893+0.952394843,
+0.745079339,
+0.809370458,
+0.950896740E-1
900+0.952394843,
+0.745079339,
+0.809370458,
+0.950896740E-1
- 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.