15 integer(IK) :: count, itry, ntry
= 10
16 type(display_type) :: disp
20 character(:),
allocatable :: choice, array
24 call disp%show(
"count = getUnifRand(4, 10)")
26 call disp%show(
"array = getUnifRand(repeat('A', count), repeat('Z', count)) ! generate random array for illustration.")
27 array
= getUnifRand(
repeat(
'A', count),
repeat(
'Z', count))
29 call disp%show( array, deliml
= SK_
"""" )
30 call disp%show(
"choice = getChoice(array)")
33 call disp%show( choice, deliml
= SK_
"""" )
34 call disp%show(
"count = getUnifRand(1, len(array))")
38 call disp%show(
"choice = getChoice(array, count) ! draw randomly only `count` elements with replacement.")
41 call disp%show( choice, deliml
= SK_
"""" )
42 call disp%show(
"choice = getChoice(array, count, unique = .true._LK) ! draw randomly only `count` elements without replacement.")
43 choice
= getChoice(array, count, unique
= .true._LK)
45 call disp%show( choice, deliml
= SK_
"""" )
51 character(
2),
allocatable :: choice(:), array(:)
55 call disp%show(
"count = getUnifRand(4, 10)")
57 call disp%show(
"array = getUnifRand('AA', 'ZZ', count) ! generate random array for illustration.")
60 call disp%show( array, deliml
= SK_
"""" )
61 call disp%show(
"choice = [getChoice(array)]")
64 call disp%show( choice, deliml
= SK_
"""" )
65 call disp%show(
"count = getUnifRand(1, len(array))")
69 call disp%show(
"choice = getChoice(array, count) ! draw randomly only `count` elements with replacement.")
72 call disp%show( choice, deliml
= SK_
"""" )
73 call disp%show(
"choice = getChoice(array, count, unique = .true._LK) ! draw randomly only `count` elements without replacement.")
74 choice
= getChoice(array, count, unique
= .true._LK)
76 call disp%show( choice, deliml
= SK_
"""" )
82 integer,
allocatable :: choice(:), array(:)
86 call disp%show(
"array = getUnifRand(1, 20, getUnifRand(4, 10)) ! generate random array for illustration.")
90 call disp%show(
"choice = [getChoice(array)]")
94 call disp%show(
"count = getUnifRand(1, size(array))")
98 call disp%show(
"choice = getChoice(array, count) ! draw randomly only `count` elements with replacement.")
102 call disp%show(
"choice = getChoice(array, count, unique = .true._LK) ! draw randomly only `count` elements without replacement.")
103 choice
= getChoice(array, count, unique
= .true._LK)
111 logical,
allocatable :: choice(:), array(:)
115 call disp%show(
"array = getUnifRand(.false., .true., getUnifRand(4, 10)) ! generate random array for illustration.")
119 call disp%show(
"choice = [getChoice(array)]")
123 call disp%show(
"count = getUnifRand(1, size(array))")
127 call disp%show(
"choice = getChoice(array, count) ! draw randomly only `count` elements with replacement.")
131 call disp%show(
"choice = getChoice(array, count, unique = .true._LK) ! draw randomly only `count` elements without replacement.")
132 choice
= getChoice(array, count, unique
= .true._LK)
140 complex,
allocatable :: choice(:), array(:)
144 call disp%show(
"array = getUnifRand((0., 0.), (1., 1.), getUnifRand(4, 10)) ! generate random array for illustration.")
148 call disp%show(
"choice = [getChoice(array)]")
152 call disp%show(
"count = getUnifRand(1, size(array))")
156 call disp%show(
"choice = getChoice(array, count) ! draw randomly only `count` elements with replacement.")
160 call disp%show(
"choice = getChoice(array, count, unique = .true._LK) ! draw randomly only `count` elements without replacement.")
161 choice
= getChoice(array, count, unique
= .true._LK)
169 real,
allocatable :: choice(:), array(:)
173 call disp%show(
"array = getUnifRand(0., 1., getUnifRand(4, 10)) ! generate random array for illustration.")
177 call disp%show(
"choice = [getChoice(array)]")
181 call disp%show(
"count = getUnifRand(1, size(array))")
185 call disp%show(
"choice = getChoice(array, count) ! draw randomly only `count` elements with replacement.")
189 call disp%show(
"choice = getChoice(array, count, unique = .true._LK) ! draw randomly only `count` elements without replacement.")
190 choice
= getChoice(array, count, unique
= .true._LK)
Generate minimally-spaced character, integer, real sequences or sequences at fixed intervals of size ...
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 procedures and generic interfaces for generating ranges of discrete character,...
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.
3array
= getUnifRand(
repeat(
'A', count),
repeat(
'Z', count))
15choice
= getChoice(array, count, unique
= .true._LK)
20array
= getUnifRand(
repeat(
'A', count),
repeat(
'Z', count))
32choice
= getChoice(array, count, unique
= .true._LK)
37array
= getUnifRand(
repeat(
'A', count),
repeat(
'Z', count))
49choice
= getChoice(array, count, unique
= .true._LK)
54array
= getUnifRand(
repeat(
'A', count),
repeat(
'Z', count))
66choice
= getChoice(array, count, unique
= .true._LK)
71array
= getUnifRand(
repeat(
'A', count),
repeat(
'Z', count))
83choice
= getChoice(array, count, unique
= .true._LK)
88array
= getUnifRand(
repeat(
'A', count),
repeat(
'Z', count))
100choice
= getChoice(array, count, unique
= .true._LK)
105array
= getUnifRand(
repeat(
'A', count),
repeat(
'Z', count))
117choice
= getChoice(array, count, unique
= .true._LK)
122array
= getUnifRand(
repeat(
'A', count),
repeat(
'Z', count))
134choice
= getChoice(array, count, unique
= .true._LK)
139array
= getUnifRand(
repeat(
'A', count),
repeat(
'Z', count))
151choice
= getChoice(array, count, unique
= .true._LK)
156array
= getUnifRand(
repeat(
'A', count),
repeat(
'Z', count))
168choice
= getChoice(array, count, unique
= .true._LK)
175"ID",
"QE",
"KR",
"NX",
"FV"
185choice
= getChoice(array, count, unique
= .true._LK)
192"LT",
"RB",
"FV",
"RR",
"WY",
"OJ"
202choice
= getChoice(array, count, unique
= .true._LK)
209"CR",
"UH",
"YP",
"SP",
"EQ",
"XU",
"LN",
"TI"
219choice
= getChoice(array, count, unique
= .true._LK)
226"DA",
"BE",
"QS",
"QD",
"HP",
"QN",
"LP",
"MR"
236choice
= getChoice(array, count, unique
= .true._LK)
243"HX",
"XI",
"LK",
"DW",
"VU",
"RK"
253choice
= getChoice(array, count, unique
= .true._LK)
260"MF",
"UW",
"IY",
"AG",
"BL"
270choice
= getChoice(array, count, unique
= .true._LK)
277"QC",
"YB",
"BO",
"SW",
"QX",
"EO",
"PA",
"GZ"
287choice
= getChoice(array, count, unique
= .true._LK)
294"UN",
"DP",
"WI",
"IY",
"FB",
"UP",
"LV"
304choice
= getChoice(array, count, unique
= .true._LK)
311"QN",
"BS",
"DM",
"AW",
"OM",
"SP",
"CB"
321choice
= getChoice(array, count, unique
= .true._LK)
328"JL",
"JO",
"ZY",
"GC"
338choice
= getChoice(array, count, unique
= .true._LK)
344+19,
+14,
+20,
+10,
+7,
+19,
+14,
+13,
+16,
+8
354choice
= getChoice(array, count, unique
= .true._LK)
360+16,
+15,
+3,
+17,
+17,
+8,
+13
370choice
= getChoice(array, count, unique
= .true._LK)
376+10,
+1,
+12,
+17,
+10,
+2,
+5,
+4,
+6
385+6,
+1,
+12,
+5,
+10,
+10,
+10,
+2,
+12
386choice
= getChoice(array, count, unique
= .true._LK)
388+2,
+10,
+6,
+12,
+1,
+10,
+4,
+5,
+17
392+7,
+12,
+7,
+12,
+7,
+7,
+14
401+7,
+7,
+14,
+7,
+7,
+12
402choice
= getChoice(array, count, unique
= .true._LK)
404+14,
+12,
+7,
+7,
+7,
+7
408+10,
+16,
+18,
+13,
+8,
+20,
+10,
+6,
+1,
+6
418choice
= getChoice(array, count, unique
= .true._LK)
424+5,
+7,
+13,
+11,
+20,
+14
434choice
= getChoice(array, count, unique
= .true._LK)
436+14,
+13,
+20,
+11,
+7
440+17,
+15,
+19,
+13,
+16,
+4,
+4,
+6
450choice
= getChoice(array, count, unique
= .true._LK)
456+4,
+10,
+15,
+19,
+6,
+15,
+3,
+3,
+10
465+6,
+3,
+3,
+3,
+6,
+3,
+19,
+10,
+15
466choice
= getChoice(array, count, unique
= .true._LK)
468+19,
+10,
+6,
+10,
+3,
+4,
+3,
+15,
+15
472+20,
+13,
+18,
+15,
+19,
+5,
+14,
+18,
+12,
+9
482choice
= getChoice(array, count, unique
= .true._LK)
488+10,
+10,
+20,
+1,
+18,
+12
497+10,
+18,
+18,
+12,
+12,
+20
498choice
= getChoice(array, count, unique
= .true._LK)
500+20,
+18,
+1,
+10,
+10,
+12
514choice
= getChoice(array, count, unique
= .true._LK)
520T, F, F, F, T, T, T, T, F, T
529T, F, F, T, T, T, F, T, T
530choice
= getChoice(array, count, unique
= .true._LK)
532F, F, T, T, T, T, F, T, F
536F, F, F, F, T, F, T, T, T
545F, F, F, F, T, F, F, F, F
546choice
= getChoice(array, count, unique
= .true._LK)
548F, T, F, F, T, F, F, T, T
562choice
= getChoice(array, count, unique
= .true._LK)
578choice
= getChoice(array, count, unique
= .true._LK)
584F, T, F, F, F, F, F, T, F, T
594choice
= getChoice(array, count, unique
= .true._LK)
610choice
= getChoice(array, count, unique
= .true._LK)
616T, T, T, T, T, F, T, F, F
625T, T, T, F, T, T, T, T, F
626choice
= getChoice(array, count, unique
= .true._LK)
628F, F, T, F, T, T, T, T, T
642choice
= getChoice(array, count, unique
= .true._LK)
658choice
= getChoice(array, count, unique
= .true._LK)
664(
+0.689017415,
+0.153150856), (
+0.945121527,
+0.506114721), (
+0.389236212E-2,
+0.668094039), (
+0.956667662,
+0.694056094), (
+0.966429114E-1,
+0.644592285), (
+0.357315719,
+0.857949674), (
+0.257722199,
+0.616719723E-1)
667(
+0.956667662,
+0.694056094)
673(
+0.689017415,
+0.153150856), (
+0.689017415,
+0.153150856), (
+0.945121527,
+0.506114721), (
+0.956667662,
+0.694056094), (
+0.945121527,
+0.506114721), (
+0.357315719,
+0.857949674), (
+0.689017415,
+0.153150856)
674choice
= getChoice(array, count, unique
= .true._LK)
676(
+0.956667662,
+0.694056094), (
+0.357315719,
+0.857949674), (
+0.257722199,
+0.616719723E-1), (
+0.966429114E-1,
+0.644592285), (
+0.689017415,
+0.153150856), (
+0.945121527,
+0.506114721), (
+0.389236212E-2,
+0.668094039)
680(
+0.369111478,
+0.262841046), (
+0.561512113,
+0.677424252), (
+0.392780483,
+0.468913436), (
+0.228224754,
+0.229533732), (
+0.239413738,
+0.813751101), (
+0.493590713,
+0.253610611E-1), (
+0.688393772,
+0.858648181)
683(
+0.561512113,
+0.677424252)
689(
+0.228224754,
+0.229533732), (
+0.493590713,
+0.253610611E-1), (
+0.369111478,
+0.262841046), (
+0.392780483,
+0.468913436), (
+0.561512113,
+0.677424252)
690choice
= getChoice(array, count, unique
= .true._LK)
692(
+0.369111478,
+0.262841046), (
+0.493590713,
+0.253610611E-1), (
+0.228224754,
+0.229533732), (
+0.239413738,
+0.813751101), (
+0.561512113,
+0.677424252)
696(
+0.759587705,
+0.414832056), (
+0.389454305,
+0.311983287), (
+0.847347200,
+0.765620410), (
+0.149498224,
+0.854240775), (
+0.373074770,
+0.667240977), (
+0.140563309,
+0.877849817), (
+0.288196385,
+0.444101155)
699(
+0.140563309,
+0.877849817)
705(
+0.140563309,
+0.877849817), (
+0.847347200,
+0.765620410), (
+0.847347200,
+0.765620410), (
+0.389454305,
+0.311983287)
706choice
= getChoice(array, count, unique
= .true._LK)
708(
+0.389454305,
+0.311983287), (
+0.847347200,
+0.765620410), (
+0.759587705,
+0.414832056), (
+0.288196385,
+0.444101155)
712(
+0.547553957,
+0.478401959), (
+0.181211531,
+0.923447490), (
+0.903124511,
+0.419654310), (
+0.592447579,
+0.453875124), (
+0.369096279,
+0.935822725E-1), (
+0.224496007,
+0.155475318), (
+0.329653621E-1,
+0.993686557), (
+0.162004292,
+0.338477075), (
+0.361967683E-1,
+0.949537992)
715(
+0.224496007,
+0.155475318)
721(
+0.903124511,
+0.419654310), (
+0.369096279,
+0.935822725E-1), (
+0.181211531,
+0.923447490), (
+0.224496007,
+0.155475318)
722choice
= getChoice(array, count, unique
= .true._LK)
724(
+0.369096279,
+0.935822725E-1), (
+0.361967683E-1,
+0.949537992), (
+0.547553957,
+0.478401959), (
+0.903124511,
+0.419654310)
728(
+0.470657706,
+0.199811220), (
+0.801813424,
+0.269964695), (
+0.464511216,
+0.124970734), (
+0.993036866,
+0.475584328), (
+0.117533624,
+0.230517030), (
+0.522841692,
+0.222008228), (
+0.943279445,
+0.944633842), (
+0.216920376,
+0.259681463), (
+0.314968288,
+0.672404230), (
+0.184636772,
+0.125122786)
731(
+0.314968288,
+0.672404230)
737(
+0.943279445,
+0.944633842), (
+0.993036866,
+0.475584328), (
+0.801813424,
+0.269964695), (
+0.184636772,
+0.125122786), (
+0.314968288,
+0.672404230), (
+0.464511216,
+0.124970734), (
+0.216920376,
+0.259681463)
738choice
= getChoice(array, count, unique
= .true._LK)
740(
+0.464511216,
+0.124970734), (
+0.522841692,
+0.222008228), (
+0.314968288,
+0.672404230), (
+0.943279445,
+0.944633842), (
+0.216920376,
+0.259681463), (
+0.801813424,
+0.269964695), (
+0.117533624,
+0.230517030)
744(
+0.293794990,
+0.266498685), (
+0.781942427,
+0.306661248), (
+0.577713549,
+0.448529661), (
+0.701519251,
+0.709551632), (
+0.335577965,
+0.585473180), (
+0.544744015,
+0.429433703), (
+0.727976680,
+0.778172374), (
+0.625442624,
+0.188105762)
747(
+0.544744015,
+0.429433703)
753(
+0.335577965,
+0.585473180), (
+0.577713549,
+0.448529661), (
+0.293794990,
+0.266498685), (
+0.727976680,
+0.778172374), (
+0.293794990,
+0.266498685)
754choice
= getChoice(array, count, unique
= .true._LK)
756(
+0.577713549,
+0.448529661), (
+0.335577965,
+0.585473180), (
+0.727976680,
+0.778172374), (
+0.701519251,
+0.709551632), (
+0.544744015,
+0.429433703)
760(
+0.270026922E-1,
+0.664817393), (
+0.889678299,
+0.341229439), (
+0.299868822,
+0.357580900), (
+0.919970930,
+0.453164995), (
+0.204000175,
+0.318107188), (
+0.889628410,
+0.782292247)
763(
+0.889628410,
+0.782292247)
769(
+0.299868822,
+0.357580900), (
+0.919970930,
+0.453164995), (
+0.889628410,
+0.782292247), (
+0.299868822,
+0.357580900), (
+0.270026922E-1,
+0.664817393), (
+0.889678299,
+0.341229439)
770choice
= getChoice(array, count, unique
= .true._LK)
772(
+0.889678299,
+0.341229439), (
+0.270026922E-1,
+0.664817393), (
+0.204000175,
+0.318107188), (
+0.919970930,
+0.453164995), (
+0.889628410,
+0.782292247), (
+0.299868822,
+0.357580900)
776(
+0.951709986,
+0.947244883), (
+0.782976449,
+0.576056838), (
+0.384249806,
+0.855426908), (
+0.725116670,
+0.422025442), (
+0.257666767,
+0.806514740), (
+0.370893300,
+0.994922519E-1), (
+0.157297850,
+0.378020942), (
+0.396809757,
+0.594036222), (
+0.372005641,
+0.405997515)
779(
+0.372005641,
+0.405997515)
785(
+0.725116670,
+0.422025442), (
+0.372005641,
+0.405997515), (
+0.396809757,
+0.594036222)
786choice
= getChoice(array, count, unique
= .true._LK)
788(
+0.370893300,
+0.994922519E-1), (
+0.725116670,
+0.422025442), (
+0.384249806,
+0.855426908)
792(
+0.278054953,
+0.451172829), (
+0.285857141,
+0.621685863), (
+0.466081560,
+0.616114676), (
+0.743892252,
+0.478729606E-1), (
+0.251291692,
+0.478526890), (
+0.901331902,
+0.192070603E-1)
795(
+0.251291692,
+0.478526890)
801(
+0.285857141,
+0.621685863), (
+0.743892252,
+0.478729606E-1), (
+0.285857141,
+0.621685863)
802choice
= getChoice(array, count, unique
= .true._LK)
804(
+0.251291692,
+0.478526890), (
+0.278054953,
+0.451172829), (
+0.743892252,
+0.478729606E-1)
808(
+0.541020036,
+0.891036689), (
+0.890317738,
+0.728464901), (
+0.440684140,
+0.406738460), (
+0.588295519,
+0.427248538), (
+0.408861518,
+0.477115929), (
+0.111218750,
+0.381124914)
811(
+0.541020036,
+0.891036689)
817(
+0.408861518,
+0.477115929), (
+0.408861518,
+0.477115929)
818choice
= getChoice(array, count, unique
= .true._LK)
820(
+0.440684140,
+0.406738460), (
+0.541020036,
+0.891036689)
824+0.212115526,
+0.431756854,
+0.317880273,
+0.451421022,
+0.835779130,
+0.675285459,
+0.978559256E-2,
+0.651251435,
+0.673030376
833+0.675285459,
+0.978559256E-2,
+0.212115526,
+0.431756854,
+0.978559256E-2,
+0.673030376,
+0.673030376,
+0.673030376
834choice
= getChoice(array, count, unique
= .true._LK)
836+0.451421022,
+0.431756854,
+0.317880273,
+0.835779130,
+0.212115526,
+0.673030376,
+0.651251435,
+0.675285459
840+0.362502456,
+0.927836001,
+0.795209408,
+0.871660709E-1,
+0.186204255,
+0.409542978,
+0.249824047,
+0.407528937,
+0.784366310,
+0.424451470
849+0.424451470,
+0.407528937,
+0.249824047,
+0.424451470
850choice
= getChoice(array, count, unique
= .true._LK)
852+0.186204255,
+0.362502456,
+0.871660709E-1,
+0.795209408
856+0.866697967,
+0.530914247,
+0.680905104,
+0.769135952
865+0.530914247,
+0.530914247
866choice
= getChoice(array, count, unique
= .true._LK)
868+0.680905104,
+0.769135952
872+0.647201896,
+0.643590152,
+0.213528097,
+0.923678517,
+0.651192009,
+0.639768720,
+0.338557959,
+0.639707029,
+0.908155739,
+0.271939158
881+0.651192009,
+0.213528097,
+0.213528097,
+0.908155739,
+0.639768720,
+0.271939158,
+0.647201896,
+0.647201896,
+0.271939158
882choice
= getChoice(array, count, unique
= .true._LK)
884+0.271939158,
+0.647201896,
+0.651192009,
+0.639768720,
+0.213528097,
+0.643590152,
+0.338557959,
+0.908155739,
+0.639707029
888+0.654499352,
+0.993079364,
+0.939329863,
+0.753258228,
+0.476211309E-1,
+0.296486795,
+0.925389886,
+0.978245080
898choice
= getChoice(array, count, unique
= .true._LK)
904+0.193377674,
+0.361907482,
+0.984295011,
+0.725786686E-1,
+0.306308866,
+0.969908655
914choice
= getChoice(array, count, unique
= .true._LK)
920+0.130937099,
+0.118659198,
+0.294595540,
+0.465088665,
+0.882933080,
+0.374153793,
+0.451860487,
+0.377380371,
+0.151105464
929+0.451860487,
+0.451860487,
+0.294595540
930choice
= getChoice(array, count, unique
= .true._LK)
932+0.377380371,
+0.151105464,
+0.374153793
936+0.851645291,
+0.568964064,
+0.344393790,
+0.857476890,
+0.702789605,
+0.706541300,
+0.483110607,
+0.727096379
945+0.706541300,
+0.702789605
946choice
= getChoice(array, count, unique
= .true._LK)
948+0.344393790,
+0.568964064
952+0.441544890,
+0.653909624,
+0.393957973,
+0.887597799E-1,
+0.772615135,
+0.146761537,
+0.138246417E-1,
+0.850942433
961+0.146761537,
+0.772615135,
+0.887597799E-1,
+0.850942433,
+0.393957973,
+0.850942433
962choice
= getChoice(array, count, unique
= .true._LK)
964+0.772615135,
+0.138246417E-1,
+0.441544890,
+0.653909624,
+0.393957973,
+0.887597799E-1
968+0.385955632,
+0.647227585,
+0.421333015,
+0.236858070,
+0.846276522,
+0.941759765
977+0.647227585,
+0.421333015,
+0.236858070
978choice
= getChoice(array, count, unique
= .true._LK)
980+0.421333015,
+0.941759765,
+0.385955632